Re: Q: about RGB values of vga_setcolor() colors

Search this archive.

From: gaw zay (gauze@rifug.org)
Date: Thu 29 Nov 2001 - 15:58:58 IST


On Wed, 28 Nov 2001, Jay Link wrote:

> > Are there any functions to get rgb values of these 16 basic colors is my
> > question, I guess. (or a way to decode gl_getpixelrgb() when using these?)
>
> I hacked this a while ago, using vga_setcolor() and vga_drawpixel() to put
> the 16 basic colors on the screen, and then gl_getpixelrgb() to read the
> RGB values. Be sure to call gl_setrgbpalette() first.

well I did try calling gl_setrgbpalette() and reading with gl_getpixelrgb()
but all on screen colors turn blue (the snapshot is blue, too) I checked the
ppm in vim and all 'r' fields are "0" and if I recall the BLUE was "0 0 128",
GREEN "0 32 64", and RED "0 0 64" (these are all from memory, they are
probably not 100% accurate, I can't recall what WHITE was possible "0 0 32")

This is what I meant by "decoding gl_getpixelrgb()" above, if I DON'T call
gl_setrgbpalette() the screen stays normal and the screen shot is all shades
of blue, I didn't see any obvious bit pattern to try processing.

Is this considered a bug that the screen colors turn blue for me? Or is it
expected behaviour when called with a
vga_setmode/gl_setcontextvga(G320x200x256) screen res/depth?

thanks for the color chart, the snapshots look good!

brian

------------Rhode Island Free Unix Group----------
http://www.rifug.org
mailto:gauze@rifug.org


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST