I’m looking for a way to find the split complementaries of an RGB color. I’m currently using Javascript, but that doesn’t matter. I’m just looking for psuedocode or any code examples, really. I’ve Googled this question a few times but I can’t seem to come up with any results. Anybody have the formula for me?
Also, I’d like to try to keep from converting to any other color formats during the process, as that can be a pain.
Convert to HSV then modify your hue angle by 180°±30° or so.
Conversions to HSV are common and easy to get. But you just need the angle bit, tweak it by the complement and then by the split and feed that sucker back into RGB.
More or less. Pick up rgb2hsv and hsv2rgb from chroma.js or any any code base. Or grab copies of both and mash them together with just the stuff you want and make a single function thing to do it.