Open abouvier opened 6 years ago
What ansi escape code would a program use to trigger the faint colors?
With \e[2m
according to this article.
Result of echo -e "\e[0mHello\e[0m" "\e[1mHello\e[0m" "\e[2mHello\e[0m";
with the default Linux.colorscheme
:
The old template syntax allowed the template developer to modify the RGB values in each baseXX variable. The mustache based templates only allow you to specify the color directly.
I'm not sure what value to specify for each faint color. I'm not sure there is a strait forwards mapping from base(1-0F) to all possible ansi colors. Maybe if you gave me an example of what values you'd specify for the default dark theme for each faint color, I could see how this could be mapped.
base00 - Default Background base01 - Lighter Background (Used for status bars) base02 - Selection Background base03 - Comments, Invisibles, Line Highlighting base04 - Dark Foreground (Used for status bars) base05 - Default Foreground, Caret, Delimiters, Operators base06 - Light Foreground (Not often used) base07 - Light Background (Not often used) base08 - Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted base09 - Integers, Boolean, Constants, XML Attributes, Markup Link Url base0A - Classes, Markup Bold, Search Text Background base0B - Strings, Inherited Class, Markup Code, Diff Inserted base0C - Support, Regular Expressions, Escape Characters, Markup Quotes base0D - Functions, Methods, Attribute IDs, Headings base0E - Keywords, Storage, Selector, Markup Italic, Diff Changed base0F - Deprecated, Opening/Closing Embedded Language Tags e.g. <?php ?>
https://github.com/chriskempson/base16-default-schemes/blob/master/default-dark.yaml
Here's an example of the ruby template that used ruby to modify the color values with a ratio
variable for konsole3 in the deprecated base16-builder system.
https://github.com/chriskempson/base16-builder/blob/master/templates/konsole/scheme.erb
As a side note: None of the original konsole 3/4 templates supported faint.
I have no idea. I just said that like that because I saw these colors in the official color schemes :p Color and ColorIntense appears to have the same value in each base16 theme anyway. ColorFaint should probably have the same value too.
When you use \e[2m on the various colors and faint is not defined, does it use the non-faint colors?
Not sure if this might help, but this is what I use for Faint color with Gruvbox Dark scheme:
And the actual RGB values can be found here: https://aur.archlinux.org/cgit/aur.git/plain/GruvboxDark.colorscheme?h=konsole-gruvbox
You want intense and faint color variations for a base16 scheme because konsole supports it. Unfortunately, it's not supported by the base16 framework, so I can't/won't commit any changes to this repository to support this feature.
The builder, color scheme designer, and template builder work together via an agreed upon protocol. The builder will read in a color scheme and set variables[1] for a mustache based template [2] to generate settings some application (in this case konsole).
The former version of the builder was not mustache based, and you could call a ruby function to modify color values via a ratio
parameter that would make brighter or dimmer versions of the same color. That could have been used to create a more extensive konsole colorscheme file, but it's no longer supported. Mustache is a simple template system that does not allow for variables to be modified. [3] Each scheme has 16 colors with no bright or faint variations. [4]
If you really want intense and faint colors that are not just set to one of the base16 colors, what you need to do will require some work. You'll need to:
sources/templates/list.yaml
) to only include base16-konsolebase00-intense-hex
, base00-faint-hex
, ...If you wanted to share your work, you'd need to create different repositories to push your work to as again this would be non-compliant with the base16 framework. The other option would be to contact Chris Kempson and see if he'd be willing to change the framework. He might also have a better idea about how to resolve this issue.
I know this is probably not the answer you want, but hopefully it does help. If I turn out to have made an incorrect assessment of the situation, please let me know.
[3] https://mustache.github.io/mustache.5.html
[4] https://github.com/chriskempson/base16-default-schemes/blob/master/default-dark.yaml
Official konsole colorschemes have additional faint colors like
BackgroundFaint
orColor0Faint
. Their absence in base16 colorschemes is done on purpose?