示例#1
0
        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;
        }
示例#2
0
    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());
    }