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

HueShiftShifts the hue of the color by the given amount of degrees.
HueShiftedReturns a new instance of the color by shifting its hue by a given amount of degrees.
HuesGenerates 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).
HuesNonAllocFills 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.
SaturateIncreases the saturation of the color by the given amount.
SaturatedReturns a new instance of the color with increased saturation.
SaturatedNonAllocFills 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.
DesaturateDecreases the saturation of the color by the given amount.
DesaturatedReturns a new instance of the color with decreased saturation.
DesaturatedNonAllocFills 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.
GrayscaleSets the saturation of the color to zero.
GrayscaledReturns a new instance of the color with zero saturation.
LightenIncreases the lightness of the color by the given amount.
LighterReturns a new instance of the color with increased lightness.
LighterNonAllocFills 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.
DarkenDecreases the lightness of the color by the given amount.
DarkerReturns a new instance of the color with decreased lightness.
DarkerNonAllocFills 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.
InvertInverts the color by subtracting the RGB components from 1.
InvertedReturns the inverse of the color by subtracting the RGB components from 1.
ComplementReturns the complement of the color by shifting the hue 180°.
WebsafeReturns the nearest websafe color to the current color.