CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2001
    Posts
    6

    Relation between VIBGYOR and RGB


    is there a formula or relation that converts VIBGYOR to RGB ? i mean, in terms of RGB we can
    say colors vary uniformly from black(0,0,0)to white(255,255,255). is there a similar uniform
    way in which colors range from Violet to Red
    (in terms of RGB)? the idea is to give it in a
    for loop from violet to red. Please help.
    Suggestions are also appreciated if you dont
    have a code for this.

    Thank you.
    Suresh Babu.





  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Relation between VIBGYOR and RGB

    VIBGYOR is an arrangement of colors according to descending frequency, the RGB model does not map directly to the frequency relationship. The CIE model is closer to this, but instead of trying to convert colors to te CIE model, you can make a lookup table, say of 240 elements.

    The first element in the LUT would be Violet(&HEE82EE), and then a gradient of 40 colors to element 40 which would be Indigo(&h82004B). The 80th element would be Green, and so on up to Red. Orange is &hFFA5&

    Now you can use this LUT whenever necessary.


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured