On Sat, 2007-10-06 at 22:09 +0200, Jan Engelhardt wrote:
This is quite a long thread :-)
The more correct term for "The value" is probably "The attribute".
You might have to include a warning that those values or attributes are
interpreted differently depending on the driver used, and the above is
mostly true for 16-color console drivers only.
For 2-colors (we still have quite a few of them) only bit 0 is true for
color (0x00 and 0x01). The rest of the bits are interpreted as
attributes:
0x02 - italic
0x04 - underline
0x08 - bold
0x80 - blink
The italic, underline and bold attributes will show up in a 2-color
framebuffer console. The blink attribute is ignored.
With a 4-color fb console (4-level grayscale), those values are again
interpreted differently.
0x00 - 0x00 : black
0x01 - 0x06 : white
0x07 - 0x08 : gray
the rest : intense white
(If by mistake 0x0106 is used, it will produce a white on white display)
With an 8-color console, only the first 8 values are considered.
With a 16-color console, that is also not consistent:
With vgacon, it supports 16-color foreground (fg), 8-color
background (bg) at 256 chars. Becomes 8 fg and 8 bg with 512 chars.
With fbcon, it supports 16 fg and 16 bg at 256, 16 fg and 8 bg at
512 chars.
And for drivers that have their own con_build_attr() hook, they will be
interpreted differently again.
You may need to specify that the values here are the console default,
ie, the default_blue|grn|red boot options are not filled up.
You may want to leave out the blink attribute (0x80) from this part.
Otherwise setterm -blink on|off will produce the opposite effect.
Tony
-