What are the acceptable colors for expanding the mercury color?

Mercurial color extension is excellent and that’s all, but on this page there is no list of what the actual colors are. I searched for a python file called color, hoping I could read the source and see it there, but no luck. I was hoping to use gray or light gray, but that was wrong. Gray (or gray) seems like a pretty likely color in the color list.

Where can I find a list of valid colors for the color extension? Or where can I find a source for the color extension?

+6
source share
2 answers

Source code can be found in the Mercurial Color Extension .

The recognized colors are by default: black, red, green, yellow, blue, magenta, cyan, white.

But, as you will see from the source, you can define custom colors, but how you do it will depend on your terminal. Find brightblue in the source.

+5
source

Valid values ​​- background and foreground - depend on the coloring mode that mercurial uses. You get maximum flexibility (?) When using the terminfo layout, in which case you usually have access to the xterm 256 color cube. This python script from Marius Gedminas will list all of them for you on your terminal (this is a shell-executable file starting with shebang, so you can just execute it directly - on a Unix'ish system). But to relieve you of this problem, I contacted the output below.

Before listing all the colors, here is a specific example of using this list in your .hgrc file:

 [extensions] color = [color] mode=terminfo color.lightgray = 250 color.darkgray = 239 status.modified = darkgray bold lightgray_background 

This will result in a dark gray text on a light gray background (these are not canonical dark and light gray colors, but these are 007 and 015). Note that there is no separate definition of foreground and background colors - you can simply add _background to a specific color name.

Color chart

+2
source

Source: https://habr.com/ru/post/920826/


All Articles