finding complementary colors?

Started by
0 comments, last by Pyabo 22 years, 6 months ago
Color theory question... Is there a formula for finding complementary colors in numeric RGB color space? Specifically, 24-bit RGB color. I have this color wheel... and it is laid out where complementary colors are opposite each other. It''s handy for finding a good color scheme for web pages, etc. But how do I determine what these colors are numerically? For instance, say I have the color value #FFA055 that I like a lot (no idea what that is)... is there a way to easily determine its compliment? Also on the wheel it has "split complementary" lines... but those don''t look quite so good.
Advertisement
The color #FFA055 is an RGB specification. Break it into 3 sets of 2 digits each and you get the red, green and blue color components:
R  G  BFF A0 55  

The numbers are specified in hexadecimal (each digit ranges from 0 - 15, where numbers greater than 9 are represented by the letters A - F; ie A = 10, E = 14, etc). So 'FF' = (15x16 + 15) = 255. 'A0' = 160 and '55' = 85. The individual Red, Green and Blue components can range from 0 - 255 in monitors or 0 - 1 in colorspace. The complement in colorspace is "the other end of the cube". ie ^RGB = (1 - R),(1 - G),(1 - B).
R_c = R / 255 = 1B_c = B / 255 = 160/255G_c = G / 255 = 85/255^R_c = 1 - R_c = 0^B_c = 1 - B_c = 95/255^G_c = 1 - G_c = 170/255^R = ^R_c * 255 = 0^B = ^B_c * 255 = 95^G = ^G_c * 255 = 170  

So your complement/inverse is (0,95,170) or #0065AA. Note that you can omit the color space calculations and do the inverse as ^R = 255 - R, and so on.

EDIT: My bad, I thought you were looking for the inverse. Color complements are more complex, and I don't know if there's a formula for them but I'll check.

Edited by - Oluseyi on September 22, 2001 7:04:08 PM

This topic is closed to new replies.

Advertisement