Notices
Results 1 to 7 of 7

Thread: additive colors

  1. #1 additive colors 
    New Member
    Join Date
    Sep 2008
    Posts
    3
    Got a little question regarding the addition of colors in different colorspaces.

    Colors from the RGB colorspace are additive and can be added by adding there individual color components.
    When c1 and c2 are colors then the addition is c3 with c3.r = c1.r+c2.r, c1.g+c2.g and c1.b+c2.b (with the r, g, b postfix being resp the red, green and blue components of the colors). c3 is then the resulting color when we shine 2 lights with color c1 and c2 towards the same spot.

    When we describe the same colors by a different colorspace (XY for example), is the resulting color c3 (in XY) also obtained by simply adding the individual components? Like c3.x = c2.x + c1.x and c3.y = c2.y + c1.y

    Might be a stupid question, but I just want to know how do you add 2 colors (I mean like in the lights example) when the colors are described by another colorspace.
    Simply converting to RGB and back seems quite incorrect as XY covers a much broader range of colors.

    Hope I'm clear enough.
    S.


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Ph.D. Hanuka's Avatar
    Join Date
    Apr 2008
    Location
    The 10th Kingdom xD
    Posts
    750
    You've lost me at 'induvidual color components'... but then again; color study is not my thing xP


    Good Brother
    ~~~~~~~~~~
    The truths that matter to us the most are often left half-spoken..
    Reply With Quote  
     

  4. #3  
    Administrator KALSTER's Avatar
    Join Date
    Sep 2007
    Location
    South Africa
    Posts
    8,231
    I found this for you (PDF): COLOR PROCESSING FOR MULTI-PRIMARY
    DISPLAY DEVICES
    .

    I think the answer is yes, but I don't know anything about this. :wink:

    Edit: Sorry, they restricted the PDF download!

    Will this help?

    "In chromatics, XYZ usually indicate colors. Generally speaking, XZ are not used to represent color space. XZ are converted into the form of xy first, and the xy are used to indicate the color space.

    x=X/(X+Y+Z) (1)

    y=Y/(X+Y+Z) (2)

    The XYZ coordinates may be quickly converted into xy coordinates according to formulas (1) and (2)."

    Google is cool, huh? :wink:
    Disclaimer: I do not declare myself to be an expert on ANY subject. If I state something as fact that is obviously wrong, please don't hesitate to correct me. I welcome such corrections in an attempt to be as truthful and accurate as possible.

    "Gullibility kills" - Carl Sagan
    "All people know the same truth. Our lives consist of how we chose to distort it." - Harry Block
    "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle
    Reply With Quote  
     

  5. #4  
    New Member
    Join Date
    Sep 2008
    Posts
    3
    (by individual color components I meant primary color components, srr for that)

    What I see in what you posted is that I always have to convert and back, which I find hard to believe. I mean isn't there a common 'formula to compute addition of colors in any given colorspace? I guess I wasn't clear enough :?

    But thanks for the reply.

    Anyway I reformulate my question:

    In RGB we have:
    cRGB3 = cRGB1 + cRGB2
    (with cRGB3 the resulting color of the light when we shine 2 lights... see first post).

    let's assume we have a colorspace CP (undefined) and a mapping from the RGB colorspace to the CP colorspace MRGBtoCP.

    with
    cCP3 = MRGBtoCP(cRGB3)
    cCP2 = MRGBtoCP(cRGB2)
    cCP1 = MRGBtoCP(cRGB1)

    does in this case
    cCP3 = cCP1 + cCP2 hold for any colorspace CP?
    Reply With Quote  
     

  6. #5  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    I think this may belong more in the Math forum than the Physics forum, but anyway...

    The simple answer is, no, there's no universal formula for addition of colors. (RGB is a nice colorspace because it has a simple formula for that. Other colorspaces are used for other reasons.) To see why, consider the HSV colorspace. Two colors with the same saturation/value will have a sum with the same saturation/value. Google HSV converter of you want to play around with the numbers.
    Reply With Quote  
     

  7. #6  
    New Member
    Join Date
    Sep 2008
    Posts
    3
    Ok, I see now.

    Srr for being in the wrong forum. I thougth colortheory was a physics subject.

    Anyway thanks for the reply and clear answer.

    S.
    Reply With Quote  
     

  8. #7  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    Well, it could be, depending on which direction you approach it from. (It could even end up in the computer science section, since that's where it's most often used.)
    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •