public static Color ShiftSaturation(Color c, float saturationDelta) { ColorHSB hsb = ColorHSB.FromColor(c); hsb.s += saturationDelta; hsb.s = Math.Min(Math.Max(hsb.s, 0), 255); return(FromHSB(hsb)); }
public static Color ShiftBrighness(Color c, float brightnessDelta) { ColorHSB hsb = ColorHSB.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) { ColorHSB hsb = ColorHSB.FromColor(c); hsb.h += hueDelta; hsb.h = Math.Min(Math.Max(hsb.h, 0), 360); return(FromHSB(hsb)); }