PDA

View Full Version : How to make yellow with RGBA color?



earth_walker
07-25-2003, 11:02 AM
Hi! I try to make it with 1 green and 1 blue, but failed.
Can you tell me what propotian is good?
Thank you!

Deiussum
07-25-2003, 11:17 AM
G + B = Cyan
R + G = Yellow
R + B = Purple/Magenta

pleopard
07-25-2003, 11:56 AM
i.e. ...

glColor3f(1,1,0);

earth_walker
07-26-2003, 04:33 AM
Oh, it is different from the common sense(Y=G+B).
Thank you!

Omaha
07-26-2003, 07:55 AM
Actually, doesn't Y+B=G?

I'm colorblind (truth), so be gentle http://www.opengl.org/discussion_boards/ubb/smile.gif

In real life, not computer graphics. R+G=Y there.

[This message has been edited by Omaha (edited 07-26-2003).]

nexusone
07-26-2003, 09:45 AM
How about take some blue and Red paint and mix them and see what you get.
Then again maybe I am thinking about dyes, but in paint your mixing with a white base in most cases. And in a dye you are mixing with a clear water base.

Anyway for openGL this is correct.

Red + Green = yellow

Red + Blue = magenta

Red + Blue + Green = white

Basic science class stuff

The then again there is not common about computer graphics and programming.


Originally posted by earth_walker:
Oh, it is different from the common sense(Y=G+B).
Thank you!



[This message has been edited by nexusone (edited 07-26-2003).]

Titus
07-26-2003, 10:55 AM
As far as I can remember, the problem here is that mixing colors is different with light and paints

Im not sure, but I think OpenGl works in the "light way" no paint way.

I.E.
(light) glColor3f(1,1,1) = white
(paint) glColor3f(1,1,1) = black

[I know RGB are not the primary in paint, but is just an example http://www.opengl.org/discussion_boards/ubb/tongue.gif]

?

Bob
07-26-2003, 01:29 PM
Mixing paint to see how to call glColor is not going to work very well. Mixing paint is subtractive blending of the colors, and mixing light is additive blending.

So mixing red, green and blue paint should give you a pretty dark color.

Tokage
07-26-2003, 01:42 PM
Gah. This is additive color mixing in a nutshell. This is what all video devices use:

Primary colors: red, green, blue
Secondary colors: magenta, yellow, cyan
Tertiary color: white

red+green = yellow
red+blue = magenta
green+blue = cyan
red+green+blue = white
no color = black

[This message has been edited by Tokage (edited 07-26-2003).]