|
From: Geert U. <ge...@li...> - 2007-10-23 07:56:29
|
On Mon, 22 Oct 2007, cga2000 wrote:
> 3 files x 16 entries define a 16-color palette with the three rgb
> channels in separate files.
>
> So that if the first entry is 0 in all three files, color0 will be
> [rgb:0,0,0] (black) .. if it is 127 in all three files it will be
> [rgb:127,127,127] (grey50..?) etc.
>
> If the second entry is 255 in the default_red file and 0 in both
> default_green and default_blue .. color1 will be pure red ..
>
> And naturally if I want color15 to be pure white the last entry in all
> three files needs to be set to 255.
>
> Right?
Right!
> In other words the three files represent the three rgb channels and the
> 16 entries the different red, green, blue values for each of the 16
> colors the console is capable of displaying simultaneously.
>
> But then why does the bash shell display my input commands in light grey
> rather than white?
Normal text is light grey.
> Does this mean that I have 8 x 2 colors and that some kind of a bold
> attribute being on of off as the application decides .. causes only text
> that is highlighted to be displayed in white while "normal" text is
> displayed in grey?
Yes, white is used for highlighted text.
> I don't suppose anyone has come up with a little utility that loops on
> the 3x16 entries and issues escape sequences to display a semi-graphical
> representation of the current color palette? Something that would
> display 8x2 squares visualizing the 16 colors.
>
> This would make it a lot easier to tell at a glance what the current
> palette looks like .. although I'm sure that with a bit of practice I
> will be able to see it just by glancing at the default_{red|grn|blu}
> files.
I attached such a script I wrote many years ago (last modified in 2004).
However, it no longer displays the highlighted colors correctly on the
console or in a gnome-terminal?
It still works fine in a good old xterm.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li...
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds |