Results 1 to 9 of 9

Thread: How to make yellow with RGBA color?

  1. #1
    Member Contributor
    Join Date
    Jun 2003
    Location
    Hamilton,On,Canada
    Posts
    55

    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!

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: How to make yellow with RGBA color?

    G + B = Cyan
    R + G = Yellow
    R + B = Purple/Magenta
    Deiussum
    Software Engineer and OpenGL enthusiast

  3. #3
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Huntsville, AL. USA
    Posts
    302

    Re: How to make yellow with RGBA color?

    i.e. ...

    glColor3f(1,1,0);
    Obsessive - A word used by the lazy to describe the motivated.

  4. #4
    Member Contributor
    Join Date
    Jun 2003
    Location
    Hamilton,On,Canada
    Posts
    55

    Re: How to make yellow with RGBA color?

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

  5. #5
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Re: How to make yellow with RGBA color?

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

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: How to make yellow with RGBA color?

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

  7. #7
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    Chile
    Posts
    10

    Re: How to make yellow with RGBA color?

    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 ]

    ?

  8. #8
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: How to make yellow with RGBA color?

    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.

  9. #9
    Member Contributor
    Join Date
    Jan 2003
    Location
    Wisconsin
    Posts
    56

    Re: How to make yellow with RGBA 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).]

Similar Threads

  1. I cannot send RGBA color as unsigned int
    By MetalHero in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-11-2016, 02:32 PM
  2. Make color transparent
    By Hylke Donker in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 03-23-2005, 06:44 AM
  3. get color for a given x , y using RGBA
    By xbedden in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-09-2004, 06:38 AM
  4. Color Index / RGBA
    By jenny in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-15-2002, 08:25 PM
  5. How to make pink color..?
    By MONA in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 01-18-2001, 07:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean