Re: Setting colors on atyfb framebuffer console.

cga2000 <[email protected]> Sun, 21 Oct 2007 20:30:46 -0400
Newsgroups gmane.linux.fbdev.user
Message-ID <[email protected]>
On Sun, Oct 21, 2007 at 07:31:31PM EDT, Antonino A. Daplas wrote:
> On Sun, 2007-10-21 at 08:34 -0400, cga2000 wrote:
> > > On Sat, Oct 20, 2007 at 12:06:31PM EDT, Antonino A. Daplas wrote:
> > > 
> > > > Each has 16 entries in decimal format standing for the red
> > > > (default_red), green (default_grn) and blue (default_blu) part of the
> > > > color. I'll be using hexadecimal from here on, since that is easier to
> > > > understand.
> > > > 
> > > > So the first entry (index 0) is 0x00 for red, 0x00 for green and 0x00
> > > > for blue. If you combine them as RGB, you get 0x000000 (black). Index 0
> > > > (which is black by default) is the default bacground color. Entry 8
> > > > (index 7), which is RGB 0xaaaaaa (light gray) is the default foreground
> > > > color.
> > > 
> > > Yes, why on earth did they decide on decimal entries?
> 
> It just happened :-). This is probably something you would handle with a
> script, so whether it's in decimal or hex probably does not matter.

Glad you got the implicit smiley.

I'm used to stuff like #808080 being half way or just about between
#000000 and #FFFFFF so I don't find decimal rgb representation very
legible.

[..]

> > > But why three files and 16 entries in each file?
> > > 
> 
> The 16 entries is standard since the linux console is limited to 16
> colors. As to why separate each component (R, G, B) into 3 files, it's
> because that is the simplest way, otherwise, we have to add additional
> code to separate each color into its components before feeding them to
> the console layer.

OK.

So we have three files for our three fundamental colors.

You have probably realized I'm a bit thick by now .. but why 16 entries
to each file - iow, I would have expected one for the background, one
for the foreground .. etc.

I'm still a bit lost.

> > > Is this documented in a man page or anything?
> > >
> 
> Not in so many words. This is a new feature, and it is described in
> Documentation/kernel-parameters.txt.

Well I guess this thread will eventually have all the specs.  Pruning
it a bit, you'd have the a linux/Documentation/fbcon_colors.txt

I do appreciate your help with this.

Cheers,
cga


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/