Click or drag to resize
ColorHCL Structure
A color struct for storing and maniputing colors in the HCL (hue, chroma, and lightness) color space.

Namespace: Experilous.MakeItColorful
Assembly: Assembly-CSharp-firstpass (in Assembly-CSharp-firstpass.dll) Version: 0.0.0.0
Syntax
C#
[SerializableAttribute]
public struct ColorHCL : IEquatable<ColorHCL>, 
	IComparable<ColorHCL>

The ColorHCL type exposes the following members.

Constructors
  NameDescription
Public methodColorHCL(Color)
Initializes a color by converting the given RGB color to the HCL color space.
Public methodColorHCL(ColorCMY)
Initializes a color by converting the given CMY color to the HCL color space.
Public methodColorHCL(ColorCMYK)
Initializes a color by converting the given CMYK color to the HCL color space.
Public methodColorHCL(ColorHCV)
Initializes a color by converting the given HCV color to the HCL color space.
Public methodColorHCL(ColorHCY)
Initializes a color by converting the given HCY color to the HCL color space.
Public methodColorHCL(ColorHSL)
Initializes a color by converting the given HSL color to the HCL color space.
Public methodColorHCL(ColorHSV)
Initializes a color by converting the given HSV color to the HCL color space.
Public methodColorHCL(ColorHSY)
Initializes a color by converting the given HSY color to the HCL color space.
Public methodColorHCL(Single, Single, Single)
Initializes a color with the given hue, chroma, and lightness, assuming an opacity of 1.
Public methodColorHCL(Single, Single, Single, Single)
Initializes a color with the given hue, chroma, lightness, and opacity.
Top
Properties
  NameDescription
Public propertyStatic memberblack
Solid black. HCLA is (0, 0, 0, 1).
Public propertyStatic memberblue
Solid blue. HCLA is (2/3, 1, 1/2, 1).
Public propertyStatic memberclear
Completely transparent black. HCLA is (0, 0, 0, 0).
Public propertyStatic membercyan
Solic cyan. HCLA is (1/2, 1, 1/2, 1).
Public propertyStatic membergray
Solid gray. HCLA is (0, 0, 1/2, 1).
Public propertyStatic membergreen
Solid green. HCLA is (1/3, 1, 1/2, 1).
Public propertyStatic membergrey
Solid gray, with English spelling. HCLA is (0, 0, 1/2, 1).
Public propertyItem
Provides access to the four color channels using a numeric zero-based index.
Public propertyStatic membermagenta
Solid magenta. HCLA is (5/6, 1, 1/2, 1).
Public propertyStatic memberred
Solid red. HCLA is (0, 1, 1/2, 1).
Public propertyStatic memberwhite
Solid white. HCLA is (0, 0, 1, 1).
Public propertyStatic memberyellow
Solid yellow. HCLA is (1/6, 1, 1/2, 1).
Top
Methods
  NameDescription
Public methodStatic memberAreOrdered
Checks if the first color is lexicographically ordered before the second color.
Public methodCompare
Determines the ordering of the first color in relation to the second color.
Public methodCompareTo
Determines the ordering of this color with the specified color.
Public methodEquals(Object)
Checks if the color is equal to a specified color.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(ColorHCL)
Checks if the color is equal to a specified color.
Public methodStatic memberFromCMY(Single, Single, Single)
Converts the given CMY color to the HCL color space.
Public methodStatic memberFromCMY(Single, Single, Single, Single)
Converts the given CMY color to the HCL color space.
Public methodStatic memberFromCMYK(Single, Single, Single, Single)
Converts the given CMYK color to the HCL color space.
Public methodStatic memberFromCMYK(Single, Single, Single, Single, Single)
Converts the given CMYK color to the HCL color space.
Public methodStatic memberFromHCV(Single, Single, Single)
Converts the given HCV color to the HCL color space.
Public methodStatic memberFromHCV(Single, Single, Single, Single)
Converts the given HCV color to the HCL color space.
Public methodStatic memberFromHCY(Single, Single, Single)
Converts the given HCY color to the HCL color space.
Public methodStatic memberFromHCY(Single, Single, Single, Single)
Converts the given HCY color to the HCL color space.
Public methodStatic memberFromHSL(Single, Single, Single)
Converts the given HSL color to the HCL color space.
Public methodStatic memberFromHSL(Single, Single, Single, Single)
Converts the given HSL color to the HCL color space.
Public methodStatic memberFromHSV(Single, Single, Single)
Converts the given HSV color to the HCL color space.
Public methodStatic memberFromHSV(Single, Single, Single, Single)
Converts the given HSV color to the HCL color space.
Public methodStatic memberFromHSY(Single, Single, Single)
Converts the given HSY color to the HCL color space.
Public methodStatic memberFromHSY(Single, Single, Single, Single)
Converts the given HSY color to the HCL color space.
Public methodStatic memberFromRGB(Single, Single, Single)
Converts the given RGB color to the HCL color space.
Public methodStatic memberFromRGB(Single, Single, Single, Single)
Converts the given RGB color to the HCL color space.
Public methodGetCanonical
Gets the canonical representation of the color.
Public methodGetChroma
Gets the chroma of the color.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetHue
Gets the hue of the color.
Public methodGetIntensity
Gets the intensity of the color.
Public methodGetLightness
Gets the lightness of the color.
Public methodStatic memberGetLightnessAtMaxChroma
Indicates the value that the lightness channel must have when the chroma channel is at its maximum value, if the color is to remain valid within the RGB color space.
Public methodGetLuma
Gets the luma (apparent brightness) of the color.
Public methodStatic memberGetMaxChroma
Indicates the maximum value that the chroma channel can have for a given value of the lightness channel, if it is to remain valid within the RGB color space.
Public methodStatic memberGetMinMaxLightness
Indicates the range of values that the lightness channel can have for a given chroma value, if the color is to remain valid within the RGB color space.
Public methodGetNearestValid
Gets the nearest HCL color that is also valid within the RGB color space.
Public methodGetValid
Gets an HCL color that is also valid within the RGB color space, using chromaBias to determine how to preserve chroma or luma.
Public methodGetValue
Gets the value of the color.
Public methodIsCanonical
Indicates if the color is canonical, or if there is a different representation of this color that is canonical.
Public methodIsValid
Indicates if the values for hue, chroma, and lightness together represent a valid color within the RGB color space.
Public methodStatic memberLerp
Performs a linear interpolation between the two colors specified for each color channel independently.
Public methodStatic memberLerpBackward
Performs a linear interpolation between the two colors specified for each color channel independently, with hue always decreasing and wrapping if necessary.
Public methodStatic memberLerpBackwardUnclamped
Performs a linear interpolation between the two colors specified for each color channel independently, with hue always decreasing and wrapping if necessary.
Public methodStatic memberLerpForward
Performs a linear interpolation between the two colors specified for each color channel independently, with hue always increasing and wrapping if necessary.
Public methodStatic memberLerpForwardUnclamped
Performs a linear interpolation between the two colors specified for each color channel independently, with hue always increasing and wrapping if necessary.
Public methodStatic memberLerpUnclamped
Performs a linear interpolation between the two colors specified for each color channel independently.
Public methodOpaque
Gets the fully opaque variant of the current color.
Public methodToString
Converts the color to string representation, appropriate for diagnositic display.
(Overrides ValueTypeToString.)
Public methodToString(String)
Converts the color to string representation, appropriate for diagnositic display.
Public methodTranslucent
Gets a partially translucent variant of the current color.
Public methodTransparent
Gets the fully transparent variant of the current color.
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Adds the color channels of the two specified colors together, wrapping the hue channel if necessary.
Public operatorStatic memberDivision
Divides the color channels of the specified color by the specified value, wrapping the hue channel if necessary.
Public operatorStatic memberEquality
Checks if the two colors are equal to each other.
Public operatorStatic member(Vector3 to ColorHCL)
Converts the specified Vector3 color to an HCL color, with x as hue, y as chroma, z as lightness, assuming an opacity of 1.
Public operatorStatic member(Vector4 to ColorHCL)
Converts the specified Vector4 color to an HCL color, with x as hue, y as chroma, z as lightness, and w as opacity.
Public operatorStatic member(ColorCMY to ColorHCL)
Converts the given CMY color to the HCL color space.
Public operatorStatic member(ColorCMYK to ColorHCL)
Converts the given CMYK color to the HCL color space.
Public operatorStatic member(ColorHCL to Vector3)
Converts the specified color to a Vector3, with hue as x, chroma as y, and lightness as z, while opacity is discarded.
Public operatorStatic member(ColorHCL to Vector4)
Converts the specified color to a Vector4, with hue as x, chroma as y, lightness as z, and opacity as w.
Public operatorStatic member(ColorHCV to ColorHCL)
Converts the given HCV color to the HCL color space.
Public operatorStatic member(ColorHCY to ColorHCL)
Converts the given HCY color to the HCL color space.
Public operatorStatic member(ColorHSL to ColorHCL)
Converts the given HSL color to the HCL color space.
Public operatorStatic member(ColorHSV to ColorHCL)
Converts the given HSV color to the HCL color space.
Public operatorStatic member(ColorHSY to ColorHCL)
Converts the given HSY color to the HCL color space.
Public operatorStatic memberGreaterThan
Checks if the first color is lexicographically ordered after the second color.
Public operatorStatic memberGreaterThanOrEqual
Checks if the first color is not lexicographically ordered before the second color.
Public operatorStatic member(Color to ColorHCL)
Converts the given RGB color to the HCL color space.
Public operatorStatic member(ColorHCL to Color)
Converts the given HCL color to the RGB color space.
Public operatorStatic memberInequality
Checks if the two colors are not equal to each other.
Public operatorStatic memberLessThan
Checks if the first color is lexicographically ordered before the second color.
Public operatorStatic memberLessThanOrEqual
Checks if the first color is not lexicographically ordered after the second color.
Public operatorStatic memberMultiply(Single, ColorHCL)
Multiplies the color channels of the specified color by the specified value, wrapping the hue channel if necessary.
Public operatorStatic memberMultiply(ColorHCL, ColorHCL)
Multiplies the color channels of the two specified colors together, wrapping the hue channel if necessary.
Public operatorStatic memberMultiply(ColorHCL, Single)
Multiplies the color channels of the specified color by the specified value, wrapping the hue channel if necessary.
Public operatorStatic memberSubtraction
Subtracts the color channels of the two specified colors together, wrapping the hue channel if necessary.
Top
Fields
  NameDescription
Public fielda
The color's alpha, or opacity, in the range [0, 1].
Public fieldc
The color's chroma, in the range [0, 1].
Public fieldStatic memberchannelCount
The number of color channels, including opacity, for colors in this color space.
Public fieldh
The color's hue, in the range [0, 1).
Public fieldl
The color's lightness, in the range [0, 1].
Top
See Also