Re: Setting colors on atyfb framebuffer console.

"Antonino A. Daplas" <[email protected]> Mon, 22 Oct 2007 07:31:31 +0800
Newsgroups gmane.linux.fbdev.user
Message-ID <1193009491.5976.8.camel@daplas>
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.

> > 
> > > If you want to change the background color from black to blue:
> > > 
> > > 1. cat /sys/module/vt/parameters/default_blu > blue.txt
> > > 2. change the first entry from 0 to 255,
> > > 3. echo blue.txt > /sys/module/vt/parameters/default_blu
> > 
> > This should be:
> > 
> > # cp blue.txt /sys/module/vt/parameters/default_blu
> > 
> > .. right?
> >

Yes, my mistake, cp or cat.

>  
> > > 4. Type 'reset' to reset the terminal.
> > 
> > Yes, I now have a blue background.
> > 
> > > 6. You should not have a light gray text on a blue background.
> > 
> > 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.

> > 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.

Tony


-------------------------------------------------------------------------
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/