Example #1
0
        public override bool Equals(object o)
        {
            if (!(o is HLSColor))
            {
                return(false);
            }
            HLSColor color = (HLSColor)o;

            return(((this.hue == color.hue) && (this.saturation == color.saturation)) && (this.luminosity == color.luminosity));
        }
Example #2
0
        internal static GcColor ApplyTintToColor(GcColor baseColor, double tint)
        {
            if (tint == 0.0)
            {
                return(baseColor);
            }
            HLSColor color = new HLSColor(baseColor);

            if (tint > 0.0)
            {
                int    num  = 240 - color.Luminosity;
                double num2 = num * tint;
                return(HLSColor.ColorFromHLS(color.Hue, color.Luminosity + ((int)num2), color.Saturation));
            }
            double num3 = color.Luminosity * -tint;

            return(HLSColor.ColorFromHLS(color.Hue, color.Luminosity - ((int)num3), color.Saturation));
        }