public override Color16Bit Filter(Color16Bit origColor) { // Too dark to saturate with good results if (origColor.red < 5000 && origColor.green < 5000 && origColor.blue < 5000) return origColor; HslColor boringHSL = new HslColor(origColor.ToRGBColor()); double satAmnt = (double)Properties.Settings.Default.saturationAmount; double diff = Math.Abs(.5 - boringHSL.L); int dir = boringHSL.L > .5 ? -1 : 1; if (diff < satAmnt) boringHSL.L = .5; else boringHSL.L += dir * satAmnt; return new Color16Bit(boringHSL.ToRgbColor()); }
public override Color16Bit Filter(Color16Bit origColor) { HslColor hsl = new HslColor(origColor.ToRGBColor()); if (hsl.L > (1.0 - (double)Properties.Settings.Default.amountToLighten)) hsl.L = 1.0; else hsl.L += (double)Properties.Settings.Default.amountToLighten; return new Color16Bit(hsl.ToRgbColor()); }