1

enter image description here

Here is a color wheel, typically from the web. I would like to create something like the user input the Yellow color code, and I am able to find the complementary color of Yellow is purple. Also, I would like to find the nearby color, light green, and the light orange. How can I implement it in a computer science way? or any existing algorithm to do so? Thanks.

DNB5brims
  • 29,344
  • 50
  • 131
  • 195
  • 3
    It should be straightforward in HSV space. Use the same S,V, add +180 degrees to H – Andrey Rubshtein Nov 15 '12 at 09:08
  • 1
    Four seconds with google yielded [How to Calculate a Complementary Colour](http://serennu.com/colour/rgbtohsl.php) – Alain Collins Nov 15 '12 at 06:39
  • 1
    OpenCV would make this really easy for you. It can convert to HSV for you with cvtColor – Hammer Nov 15 '12 at 15:59
  • The answer at http://stackoverflow.com/questions/14095849/calculating-the-analogous-color-with-python/14116553#14116553 can be directly adjusted for this. – mmgp Jan 12 '13 at 22:55

0 Answers0