Use preformatted_text color for rendering plain text files#351
Merged
makew0rld merged 1 commit intomakew0rld:masterfrom Dec 18, 2024
Merged
Use preformatted_text color for rendering plain text files#351makew0rld merged 1 commit intomakew0rld:masterfrom
makew0rld merged 1 commit intomakew0rld:masterfrom
Conversation
Using a color from the theme should make the rendering of text files be more in line with the colors chosen for styled content. Furthermore, allowing some form of user override for the color of plain text files allows users to individually fix bad color combinations. Such as in my case, where the combination of a solarized terminal theme and the default color chosen by amfora causes plain text files to be rendered as white text on an almost equally bright background.
Owner
Can you explain more about this issue? Why doesn't it occur when browsing gemtext files? |
Contributor
Author
|
Can you explain more about this issue? Why doesn't it occur when
browsing gemtext files?
Basically I am using xfce4-terminal with the solarized light color
scheme. While this actually looks quite good, it usually combines
horribly with applications that try to do more fancy color handling
themselves. Especially since the color scheme only redefines 16 colors
while those applications often use 256, which often causes a certain
misalignment of color schemes.
As a solution, I usually just redefine the color scheme in the
config file. That's also what I did in amfora. The default settings
for text/gemini would also render white text on an almost white
background. It's just that I had no way to redefine the color used
for text/plain.
Furthermore, I believe that there are specific terminal color codes for
"foreground" and "background". While these may sometimes be the same as
"white" and "black", they are not guaranteed to be. In the particular
case of light color schemes, they are usually even inverted. So as a
general rule, I believe using "default foreground" rather than "white"
is the safer default.
|
Owner
|
Makes sense, thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using a color from the theme should make the rendering of text files be more in line with the colors chosen for styled content. Furthermore, allowing some form of user override for the color of plain text files allows users to individually fix bad color combinations. Such as in my case, where the combination of a solarized terminal theme and the default color chosen by amfora causes plain text files to be rendered as white text on an almost equally bright background.