Calculate the luminance of an RGB value. (Scale is irrelevant can be in [0,1] or [0,255] or anything you want to)
Calculate the complementary color of the given color. Needs to be in [0,255] scale.
The relative sRGB luminance is defined by Y = 0.2126 * R + 0.7152 * G + 0.0722 * B