enComputerevilvte
adm Find login register

[demo] Color schemes

caleb
joined: 2007-09-22
posted: 630
promoted: 134
bookmarked: 90
1subject: [demo] Color schemesPromote 0 Bookmark 02009-09-30quote  

Default color of libvte

 <- evilvte 0.4.4~pre9 and later, #define COLOR_STYLE VTE_FIXED 

<- evilvte 0.4.3, do nothing but only use the default color scheme of libvte

 

#define COLOR_STYLE LINUX

 

#define COLOR_STYLE RXVT

 

#define COLOR_STYLE TANGO

 

#define COLOR_STYLE XTERM

edited: 5
guest
2subject: Promote 0 Bookmark 02008-12-05quote  
of course, the one option I didn't mess with!  I've switched to Linux color style and now I can see my dark grays again :)  Thanks, evilvte will be deployed :)
guest
3subject: Promote 0 Bookmark 02009-09-29quote  

What about giving us the option of customizing  each of those 16 colors?  Not to cause total psychadelic confusion (ok, that's actually an option for those so inclined), but to finetune certain ANSI colors so you better can distinguish them in certain combinations of background/forground color.

[I'm one of those who compile a customized instance of evilvte for each and every host I'm going to connect to, each with it's own combination of background, foreground and cursor colors... and a matching custom icon too.  I'll probably never switch back to gnome-terminal again... ;-)]

caleb
joined: 2007-09-22
posted: 630
promoted: 134
bookmarked: 90
4subject: Promote 0 Bookmark 02009-09-30quote  
guest
What about giving us the option of customizing  each of those 16 colors?

It is in my TODO list but with a lower priority. :-P

I think it will not be in 0.4.5 unless someone provide a patch for it.

guest
5subject: Promote 0 Bookmark 02009-11-18quote  

Actually, this is in a way already implemented.  At least if "any" additions to the config.h file is fair game Wink.

This is how I did it for a terminal with white background, black foreground and red cursor:

-----8<----------8<----------8<----------8<----------8<----------8<----------8<-----

#define COLOR_STYLE  USERCOLOR /* Options: VTE_FIXED, LINUX, RXVT, TANGO, XTERM     */
/* Use value 'USERCOLOR' for COLORSTYLE to let evilvte use the below
 * custom color palette named 'color_usercolor' 
 */
#define USERCOLOR color_usercolor 
const GdkColor color_usercolor[16] =
{
    {0, 0x3333, 0x3333, 0x3333 }, // black (true black)
    {0, 0x9999, 0x0000, 0x0000 }, // red
    {0, 0x0000, 0x8000, 0x0000 }, // green
    {0, 0x8000, 0x8000, 0x0000 }, // yellow
    {0, 0x0000, 0x0000, 0xffff }, // blue
    {0, 0x8000, 0x0000, 0x8000 }, // magenta
    {0, 0x0000, 0x8000, 0x8000 }, // cyan
    {0, 0x9999, 0x9999, 0x9999 }, // "dark" white (actually, light grey)
    {0, 0x6666, 0x6666, 0x6666 }, // "pale" black (actually, dark grey)
    {0, 0xe666, 0x0000, 0x0000 }, // bright red
    {0, 0x0000, 0xe666, 0x0000 }, // bright green
    {0, 0xe666, 0xe666, 0x0000 }, // bright yellow
    {0, 0x4ccc, 0x4ccc, 0xffff }, // bright blue
    {0, 0xffff, 0x0000, 0xffff }, // bright magenta
    {0, 0x0000, 0xffff, 0xffff }, // bright cyan
    {0, 0xe666, 0xe666, 0xe666 }  // white (true white)
};

 

-----8<----------8<----------8<----------8<----------8<----------8<----------8<-----

Voila! The custom color scheme is implemented without touching anything else than the config.h file!  Two things worth pointing out:

The COLOR_STYLE option must be set to something unique (in my case: USERCOLOR), and then there must be an option defined with that specific name and it must be defined with the C variable holding the palette (in my case, the option will be named USERCOLOR and the palette is called color_usercolor).  Finally, the actual palette structure must be included.

Second thing to remark: my intent with this specific palette is to ensure that all colors are at least different from foreground, background and color.  This means that black color is not fully black (so if you print default foreground color over a "black" background, you will actually be able to faintly see the written text) and that explicitly white text is not fully white (meaning that white text will be distinguishable as a very pale grey text against the white).  Finally, bright red is made a bit darker than the cursor.

 It is possible to add a commented out version of the above structure to the config.h file that comes with evilvte.  Sure, it is perhaps not the most user friendly configuration text to edit (and it is inconsistent with the way to specify options for background, foreground etc) but it will provide a crude hint for powerusers how to tweak the palette.  Perhaps an explicit note in that commented out block of code should be included that states that this solution in the future will be replaced with something more human friendly.

"More human friendly" means that a user sets "COLOR_STYLE" to XTERM and then only specifies the few colors he/she wants to alter by specifying COLOR_0 #191919 to change black to 'nearly black' and specifying COLOR_11 #ff9900 to make bright yellow actually look orange and then not worry about specifying any more colors.  Well, ideas, ideas, ideas...

/IllvilJa

caleb
joined: 2007-09-22
posted: 630
promoted: 134
bookmarked: 90
6subject: Promote 0 Bookmark 02009-11-19quote  
guest
Voila! The custom color scheme is implemented without touching anything else than the config.h file!

Thank you for the patch.

However, I want to keep config.h more "end-user friendly", so I will not 100% apply this patch.

Althouth build-time configuration is impossible to be really "end-user friendly", I do know some evilvte users never learned C or other programming languages.

I am planning 0.4.6~pre1 but it may not include all your recent feature requests. :-P

I have put them to my TODO list.

(Well, my TODO list is so long that I think I will never write them all before evilvte 2.0.0.) 

guest
7subject: Promote 0 Bookmark 02009-11-25quote  

Great news that you will create a more end-user-friendly configuration solution (even if I'm quite pleased with the absurd power hacking the config.h file gives you)

For such a config solution (which I assume will be some config file which is read by the evilvte executable at runtime), please add support early on using one single executable to use multiple profiles.  One (very) simple way to accomplish that is to have a flag

 --config-file=particular_config.cfg

which controls where to get the run time configuration.

That way, I can have one config file per connection I have.  So for one host, I get one specific set of colors and icons... for another host... oh, I'm repeating myself, I've already told this story so many times already.

PS. Regarding color schemes... I'm enjoying in one of my connections a color scheme where I've adjusted any "colliding" colors so they actually can be told apart.  So, even if I use yellow as the foreground color for that specific connection, the explicit yellow color is made slightly orange, making it possible to see what text is "default" and what text is intentionally yellow.  Same for any explicit black color vs the defaul black BG of the terminal, by making the explicit black color actually dark grey I can tell any black text apart from the black background!

Simply put, evilvte is WIN!

Keep up the good work!

/IllvilJa

PS. All I need now is some sort of automated script which take as input any wanted foreground, background, cursor, dim and bold color values and then outputs an adjusted color scheme which makes all the 5 + 16 colors distinct (and still ensure that sensible combinations like dark blue on white is clearly readable and dark white on white is at least possible to read with some effort...)

enComputerevilvte
adm Find login register
views:20275