Running pseudocolor in an 8-bit color X server

A

AJ

I have an application that needs certain RGB values for the
backgrounds of the buttons in the toolbar. These particular colors do
not reside in the 6x6x6 color cube that I have available to me in 8bit
color. Is their any packages that will allow for pseudocolor in this
situation?

Thanks!
 
M

Marco Schmidt

AJ:
I have an application that needs certain RGB values for the
backgrounds of the buttons in the toolbar. These particular colors do
not reside in the 6x6x6 color cube that I have available to me in 8bit
color. Is their any packages that will allow for pseudocolor in this
situation?

What do you mean by pseudo color? Color quantization plus optional
dithering?

Regards,
Marco
 
A

AJ

Excuse my ignorance, this is all new to me :) I guess what I mean is
that I need the whole RGB 24 bit color palette under an 8-bit
environment. Not for images however, I need these colors for
backgrounds of JButtons and other JComponents. I need exact rgb
values like (0,80,0) because of the program that I am simulating.
Thanks for your help.
 
A

AJ

what is this 6x6x6 color cube thing?
why don't you just use something like
setBackground(Color(100,200,100));

6x6x6 seems to be the colors supported by Java in 8 bit mode. I.E.:

Red Green Blue
--- --- ---
0 0 0
51 51 51
102 102 102
153 153 153
204 204 204
255 255 255

There are 216 possible permutations of the colors.

So,

setBackground(Color(100,200,100))

would not work, but

setBackground(Color(102,204,102))

would work. (under 8 bit mode)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top