-
-
Notifications
You must be signed in to change notification settings - Fork 300
opencode: brighten default text colors #2100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
When I implemented it, I was using a few themes as guidelines. |
trueNAHO
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use base06 for text, markdown, and punctuation slots so the OpenCode target matches upstream Catppuccin palettes and provides better contrast across dark Stylix themes.
Since I do not really use AI tools, I might be wrong on this, but if the
provided screenshots show the AI's intermediate "reasoning", would it not make sense to make it visually less prominent than the final real output? What is upstream's default behavior here?
diff --git a/modules/opencode/hm.nix b/modules/opencode/hm.nix index ce83cfe20..707c27b10 100644 --- a/modules/opencode/hm.nix +++ b/modules/opencode/hm.nix @@ -148,7 +148,7 @@ mkTarget { light = colors.withHashtag.base0A; }; markdownText = { - dark = colors.withHashtag.base04; + dark = colors.withHashtag.base06; light = colors.withHashtag.base00; }; primary = { @@ -186,7 +186,7 @@ mkTarget { light = colors.withHashtag.base0D; }; syntaxPunctuation = { - dark = colors.withHashtag.base04; + dark = colors.withHashtag.base06; light = colors.withHashtag.base00; }; syntaxString = { @@ -202,7 +202,7 @@ mkTarget { light = colors.withHashtag.base07; }; text = { - dark = colors.withHashtag.base04; + dark = colors.withHashtag.base06; light = colors.withHashtag.base00; }; textMuted = {
Why should these be different from markdownCodeBlock.dark:
stylix/modules/opencode/hm.nix
Lines 106 to 109 in 844294a
| markdownCodeBlock = { | |
| dark = colors.withHashtag.base04; | |
| light = colors.withHashtag.base00; | |
| }; |
I am not sure if we should check if other themes will also "behave" better.
Usually checking the dark and light themes is fine.
On a side note, the pending PR #1857 introduces
stylix/stylix/testbed/themes/empty.nix
Line 17 in 3c286df
| base16Scheme = "${pkgs.base16-schemes}/share/themes/mellow-purple.yaml"; |
to make it hopefully visually very obvious when something is unthemed or not adaptive enough.
af54964 to
90cac77
Compare
|
Based on your screenshots, this makes the text indeed stand more out. However, does this align with the upstream behavior:
|
trueNAHO
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that is in this case not reasoning/thinking; that is an actual response.
I activated the thinking for the session and took before/after screenshots. So there are now extra blocks in the screenshot. I also attached the default theme from OpenCode. (dark one)
Thanks for the clarification and screenshots. Seems like upstream distinguishes between "reasoning" and status reports.
I am fine with merging this if @arunoruto approves.
arunoruto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the changes out today and it looked alright to me!
Using base09 for diff hunk headers and base0A for markdown block quotes made neutral UI elements look urgent. Markdown code blocks also reused the default text color as a background, reducing contrast. Return these components to neutral backgrounds instead: keep diff hunk headers on base03, block quotes on base03/base01, and code blocks on base01 so warnings stay on base0A and urgency cues remain meaningful.
90cac77 to
603e8b8
Compare
Using base09 for diff hunk headers and base0A for markdown block quotes made neutral UI elements look urgent. Markdown code blocks also reused the default text color as a background, reducing contrast. Return these components to neutral backgrounds instead: keep diff hunk headers on base03, block quotes on base03/base01, and code blocks on base01 so warnings stay on base0A and urgency cues remain meaningful. Link: #2100 Reviewed-by: NAHO <[email protected]> Approved-by: NAHO <[email protected]> Tested-by: Mirza Arnaut <[email protected]> Approved-by: Mirza Arnaut <[email protected]> (cherry picked from commit b135edb)
|
Successfully created backport PR for |
Using base09 for diff hunk headers and base0A for markdown block quotes made neutral UI elements look urgent. Markdown code blocks also reused the default text color as a background, reducing contrast. Return these components to neutral backgrounds instead: keep diff hunk headers on base03, block quotes on base03/base01, and code blocks on base01 so warnings stay on base0A and urgency cues remain meaningful. Link: nix-community#2100 Reviewed-by: NAHO <[email protected]> Approved-by: NAHO <[email protected]> Tested-by: Mirza Arnaut <[email protected]> Approved-by: Mirza Arnaut <[email protected]>












Use base06 for text, markdown, and punctuation slots so the OpenCode target matches upstream Catppuccin palettes and provides better contrast across dark Stylix themes.
Previous:

After:
