Subject: [TAG] framebuffer colors or what is right with thomas adam?

From: "frank.n. dale" <[email-masked]>
Date: Sat, 13 Mar 2004 17:03:42 +0200

Hello Answer Gang,

Please do not forward this query to Thomas Adam, he
does not know.

  How do you set and get colors outside the range 0-F hex
  when using framebuffer in the Linux console?

This query is not a home work exercise. It is based on
fruitless Goggle search of many hours over a span of
several months. The major framebuffer sites

    http://linuxconsole.sourceforge.net/fbdev/
    http://linux-fbdev.sourceforge.net/
    http://www.directfb.org/

do not deal with it nor does the HOWTO-framebuffer.
Also the console escape sequences for colors only apply
to colors 0-F.

The only solution found so far involves the SVGALib
which is too much of an overhead. There must be a
simpler solution. Do you know more than I do?

The query is relevant for syntax coloring in the Linux
console (text, no X). With the standard 16 foreground
and 8 background colors, syntax coloring is a pain in
the eyes. With the 256 colors or more that you get from
framebuffer, syntax coloring could become pleasant and
effective.

So how do you set and get those colors outside the
standard range?

Regards

Frank

_______________________________________________
TAG mailing list
[email-masked]
http://linuxgazette.net/mailman/listinfo/tag

---

From: Thomas Adam <[email-masked]>
Date: Sat, 13 Mar 2004 15:33:22 +0000 (GMT)

> Please do not forward this query to Thomas Adam, he

Unfortunately, I do.

>   when using framebuffer in the Linux console?

For this, you will have to look at vga.c in the kernel source, and at
fb.c. You will almost certainly have to hack the kernel source to allow
this.

> simpler solution. Do you know more than I do?

SVGALib is nothing to do with framebuffers, but it will allow you to
display console screen resolutions higher than the default.
 
> framebuffer, syntax coloring could become pleasant and

So why not run your console with a setting of:

``
vga=0x317
''

while will run a 1024x786x256 colours.

Look here:

```
Colours   640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200
--------+--------------------------------------------------------------
 4 bits |    ?       ?     0x302      ?        ?        ?         ?
 8 bits |  0x300   0x301   0x303    0x305    0x161    0x307     0x31C
15 bits |    ?     0x310   0x313    0x316    0x162    0x319     0x31D
16 bits |    ?     0x311   0x314    0x317    0x163    0x31A     0x31E
24 bits |    ?     0x312   0x315    0x318      ?      0x31B     0x31F
32 bits |    ?       ?       ?        ?      0x164      ?
'''

(this is for: vga=<foo> in /etc/lilo.conf).

> So how do you set and get those colors outside the

(see above)

-- Thomas Adam

=====
"The Linux Weekend Mechanic" -- http://linuxgazette.net
"TAG Editor"                 -- http://linuxgazette.net

"<shrug> We'll just save up your sins, Thomas, and punish 
you for all of them at once when you get better. The 
experience will probably kill you. :)"

 -- Benjamin A. Okopnik (Linux Gazette Technical Editor)

___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html
_______________________________________________
TAG mailing list
[email-masked]
http://linuxgazette.net/mailman/listinfo/tag

---

From: Ben Okopnik <[email-masked]>
Date: Sat, 13 Mar 2004 11:45:31 -0500

> > Please do not forward this query to Thomas Adam, he

[raising eyebrows] You're far kinder than I am, Thomas. Anything worded
that way wouldn't get any useful response from me... well, behavioral
correction is useful, but perhaps not to the querent's *immediate*
purposes.

* Ben Okopnik * okopnik.freeshell.org * Technical Editor, Linux Gazette *
-=-=-=-=-=o0o=-=-=-=-= <http://linuxgazette.net/> =-=-=-=-=o0o=-=-=-=-=-
_______________________________________________
TAG mailing list
[email-masked]
http://linuxgazette.net/mailman/listinfo/tag

---

From: Thomas Adam <[email-masked]>
Date: Sat, 13 Mar 2004 17:09:15 +0000 (GMT)

> correction is useful, but perhaps not to the querent's *immediate*

/me breaks down and cries...

I cccouldn't help it, Ben.....Frank said he had done months of
pain^H^H^H^Hstaking research at all the main FB sites and did not bear any
fruit. I figured as he was a monkey he wanted a banana, so I gave him that
reply...

*sniff*

-- Thomas Adam

=====

---

From: Thomas Adam <[email-masked]>
Date: Sat, 13 Mar 2004 17:09:15 +0000 (GMT)

*sniff*

-- Thomas Adam

=====