Adjustment
Static Class in Zigurous.ColorPro
Declaration
public static class Adjustment
Description
Functions for adjusting color values, e.g., hue, saturation, lightness, etc.
Extension Methods
HueShift | Shifts the hue of the color by the given amount of degrees. |
HueShifted | Returns a new instance of the color by shifting its hue by a given amount of degrees. |
Hues | Generates hues of the base color with a given increment of degrees. For example, an increment of 30 will generate 12 different hues (360/30 = 12). |
HuesNonAlloc | Fills an existing array with the hues of the base color to prevent heap allocations. The amount of hues generated is determined by the size of the array. |
Saturate | Increases the saturation of the color by the given amount. |
Saturated | Returns a new instance of the color with increased saturation. |
SaturatedNonAlloc | Fills an existing array with saturated colors of the base color to prevent heap allocations. The amount of colors generated is determined by the size of the array. |
Desaturate | Decreases the saturation of the color by the given amount. |
Desaturated | Returns a new instance of the color with decreased saturation. |
DesaturatedNonAlloc | Fills an existing array with desaturated colors of the base color to prevent heap allocations. The amount of colors generated is determined by the size of the array. |
Grayscale | Sets the saturation of the color to zero. |
Grayscaled | Returns a new instance of the color with zero saturation. |
Lighten | Increases the lightness of the color by the given amount. |
Lighter | Returns a new instance of the color with increased lightness. |
LighterNonAlloc | Fills an existing array with lighter colors of the base color to prevent heap allocations. The amount of colors generated is determined by the size of the array. |
Darken | Decreases the lightness of the color by the given amount. |
Darker | Returns a new instance of the color with decreased lightness. |
DarkerNonAlloc | Fills an existing array with darker colors of the base color to prevent heap allocations. The amount of colors generated is determined by the size of the array. |
Invert | Inverts the color by subtracting the RGB components from 1. |
Inverted | Returns the inverse of the color by subtracting the RGB components from 1. |
Complement | Returns the complement of the color by shifting the hue 180°. |
Websafe | Returns the nearest websafe color to the current color. |