# How to make yellow with RGBA color?

Hi! I try to make it with 1 green and 1 blue, but failed.
Can you tell me what propotian is good?
Thank you!

G + B = Cyan
R + G = Yellow
R + B = Purple/Magenta

i.e. …

glColor3f(1,1,0);

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

Actually, doesn’t Y+B=G?

I’m colorblind (truth), so be gentle

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

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

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).]

As far as I can remember, the problem here is that mixing colors is different with light and paints

I´m 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 [img]http://www.opengl.org/discussion_boards/ubb/tongue.gif[/img]]

?

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.

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).]