/// <summary>Returns a complementary color. i.e. if <see cref="Colors.White"/> is specified then <see cref="Colors.Black"/> would be returned.</summary> public static Color Complementary(this Color color) { var hsv = color.AsHSV(); hsv.hue = (hsv.hue + 0.5f) % 1f; return(hsv.AsColor()); }
/// <summary>Applies the specified hue shift, hue offset and saturation level to this <see cref="Color"/> that is contained within an <see cref="System.Collections.IEnumerable"/>.</summary> public static Color ApplyOffsets(this Color color, float hueShift, float hueOffset, float saturation, int index, int length, bool invert) { var hsv = color.AsHSV(); ApplyHueOffset(ref hsv, hueOffset, index, length, invert); ApplyHueShift(ref hsv, hueShift); ApplySaturationLevel(ref hsv, saturation); return(hsv.AsColor()); }
/// <summary>Applies the specified hue shift, hue offset and saturation levels to this <see cref="Color"/>.</summary> public static Color ApplyOffsets(this Color color, float hueShift, float hueOffset, float saturation) { var hsv = color.AsHSV(); ApplyHueShift(ref hsv, hueShift); ApplyHueOffset(ref hsv, hueOffset); ApplySaturationLevel(ref hsv, saturation); return(hsv.AsColor()); }