public void OnTrackBorderColorChanged(Color color) { Color differentColor = new Color(color.g, color.b, color.r); HSLColor skyColor = HSLColor.FromRGBA(differentColor); skyColor.l = 0.8f; this.targetSkyColor = skyColor.ToRGBA(); skyColor.l = 0.9f; this.targetAmbientColor = skyColor.ToRGBA(); this.sun.color = this.targetAmbientColor; }
public static Color Complementary(this Color color) { HSLColor hsl = color; float compHue = hsl.h; compHue = (compHue + 180f) % 360f; HSLColor comp = new HSLColor(compHue, hsl.s, hsl.l, hsl.a); return(comp.ToRGBA()); }