With the default Gnome colour schema, keywords are completely invisible in the ansible docs. Is this a configuration issue on my side, or can you reproduce?
To me it looks like a different colour would make sense.
With the default Gnome colour schema, keywords are completely invisible in the ansible docs. Is this a configuration issue on my side, or can you reproduce?
To me it looks like a different colour would make sense.
I’d say this is an issue with Gnome Terminal application as they haven’t considered black color visibility with it’s theme.
You can fix it by overriding the black color to white for example.
Thanks for your answer! Does it show correctly in your terminal? I would expect the terminal background to be black, so black on black would never be visible, or am I wrong?
It does not display correctly in my terminal either unless i change the black color value.
This is an issue with any cli tool that print standardized ansi black color.
So its an oversight of gnome terminal color schemes not considering contrast of black text in dark background.
I’m wondering whether there’s a way for programs to ask the terminal for the background color (or an average background color, that’s probably more helpful in general), so they can adjust their colors accordingly. Otherwise it’s whack-a-mole since if you adjust the colors in ansible-doc to make it look good in the Gnome terminal with the (apparent) default theme, you’ll make it look bad in someone else’s color scheme.
The only way around would be forcing a specific background color in ansible-doc, but I don’t think anyone really wants that…
In any case, you can simply configure the colors ansible-doc uses, or tell it not to use colors at all. The latter can be done with the ANSIBLE_NOCOLOR
environment variable, for example, and the former with various ANSIBLE_COLOR_DOC_*
variables, for example COLOR_DOC_CONSTANT
.
I think the issue is less complex. Originally the background is black and there 8 colours, including black. Newer terminal emulators like the Gnome terminal can use a palette, so if colour 1 is usually red, I can make it purple instead. Or I can define a theme with a light background, and then I (as the person designing the theme) have to adjust the other colours accordingly. So what would be a dark grey for a black background, would be a light gray on a white background.
In this way, the Gnome theme is wrong because dark grey (which is used for the constants) is not visible on the theme background even though it should be.
But using dark grey for something that should be visible is anyway not so ideal, so my approach is this.
Also, thanks Felix for the information about the variables!
fwiw, the change you propose in the PR doesn’t work for my color profile that I use when working outdoors, it’s the same as my background
Seriously? Is this a custom palette you are using? Or are palettes just broken in general?