/// <summary> /// Gets the inverted HSB color. /// </summary> /// <param name="input">The color to invert.</param> /// <returns>An inverted HSB struct.</returns> public static HSB GetInverted(HSB input) { float hue = input.Hue; if (hue < 0.5f) { hue += 0.5f; } else { hue -= 0.5f; } return(new HSB(hue * 360, input.Saturation100, input.Brightness100, input.A)); }
/// <summary> /// Inverts the current color. /// </summary> /// <returns>The inverted color.</returns> public HSB GetInverted() { return(HSB.GetInverted(this)); }