public static Color ShiftSaturation(Color c, float saturationDelta) { HSBColor hsb = HSBColor.FromColor(c); hsb.s += saturationDelta; hsb.s = Math.Min(Math.Max(hsb.s, 0), 255); return(FromHSB(hsb)); }
public static Color ShiftBrightness(Color c, float brightnessDelta) { HSBColor hsb = HSBColor.FromColor(c); hsb.b += brightnessDelta; hsb.b = Math.Min(Math.Max(hsb.b, 0), 255); return(FromHSB(hsb)); }
public static Color ShiftHue(Color c, float hueDelta) { HSBColor hsb = HSBColor.FromColor(c); hsb.h += hueDelta; hsb.h %= 360; return(FromHSB(hsb)); }