Click or drag to resize
ColorHSV Structure
A color struct for storing and maniputing colors in the HSV (hue, saturation, and value) color space.

Namespace: Experilous.MakeItColorful
Assembly: Assembly-CSharp-firstpass (in Assembly-CSharp-firstpass.dll) Version: 0.0.0.0
Syntax
C#
[SerializableAttribute]
public struct ColorHSV

The ColorHSV type exposes the following members.

Constructors
  NameDescription
Public methodColorHSV(Color)
Initializes a color by converting the given RGB color to the HSV color space.
Public methodColorHSV(ColorCMY)
Initializes a color by converting the given CMY color to the HSV color space.
Public methodColorHSV(ColorCMYK)
Initializes a color by converting the given CMYK color to the HSV color space.
Public methodColorHSV(ColorHCL)
Initializes a color by converting the given HCL color to the HSV color space.
Public methodColorHSV(ColorHCV)
Initializes a color by converting the given HCV color to the HSV color space.
Public methodColorHSV(ColorHCY)
Initializes a color by converting the given HCY color to the HSV color space.
Public methodColorHSV(ColorHSL)
Initializes a color by converting the given HSL color to the HSV color space.
Public methodColorHSV(ColorHSY)
Initializes a color by converting the given HSY color to the HSV color space.
Public methodColorHSV(Single, Single, Single)
Initializes a color with the given hue, saturation, and value, assuming an opacity of 1.
Public methodColorHSV(Single, Single, Single, Single)
Initializes a color with the given hue, saturation, value, and opacity.
Top
Properties
  NameDescription
Public propertyItem
Provides access to the four color channels using a numeric zero-based index.
Top
Methods
  NameDescription
Public methodEquals
Checks if the color is equal to a specified color.
(Overrides ValueTypeEquals(Object).)
Public methodStatic memberFromCMY(Single, Single, Single)
Converts the given CMY color to the HSV color space.
Public methodStatic memberFromCMY(Single, Single, Single, Single)
Converts the given CMY color to the HSV color space.
Public methodStatic memberFromCMYK(Single, Single, Single, Single)
Converts the given CMYK color to the HSV color space.
Public methodStatic memberFromCMYK(Single, Single, Single, Single, Single)
Converts the given CMYK color to the HSV color space.
Public methodStatic memberFromHCL(Single, Single, Single)
Converts the given HCL color to the HSV color space.
Public methodStatic memberFromHCL(Single, Single, Single, Single)
Converts the given HCL color to the HSV color space.
Public methodStatic memberFromHCV(Single, Single, Single)
Converts the given HCV color to the HSV color space.
Public methodStatic memberFromHCV(Single, Single, Single, Single)
Converts the given HCV color to the HSV color space.
Public methodStatic memberFromHCY(Single, Single, Single)
Converts the given HCY color to the HSV color space.
Public methodStatic memberFromHCY(Single, Single, Single, Single)
Converts the given HCY color to the HSV color space.
Public methodStatic memberFromHSL(Single, Single, Single)
Converts the given HSL color to the HSV color space.
Public methodStatic memberFromHSL(Single, Single, Single, Single)
Converts the given HSL color to the HSV color space.
Public methodStatic memberFromHSY(Single, Single, Single)
Converts the given HSY color to the HSV color space.
Public methodStatic memberFromHSY(Single, Single, Single, Single)
Converts the given HSY color to the HSV color space.
Public methodStatic memberFromRGB(Single, Single, Single)
Converts the given RGB color to the HSV color space.
Public methodStatic memberFromRGB(Single, Single, Single, Single)
Converts the given RGB color to the HSV color space.
Public methodGetCanonical
Gets the canonical representation of the color.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetNearestValid
Gets the nearest HSV color that is also valid within the RGB color space.
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, saturation, and value 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 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.
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 ColorHSV)
Converts the specified Vector3 color to an HSV color, with x as hue, y as saturation, z as value, assuming an opacity of 1.
Public operatorStatic member(Vector4 to ColorHSV)
Converts the specified Vector4 color to an HSV color, with x as hue, y as saturation, z as value, and w as opacity.
Public operatorStatic member(ColorCMY to ColorHSV)
Converts the given CMY color to the HSV color space.
Public operatorStatic member(ColorCMYK to ColorHSV)
Converts the given CMYK color to the HSV color space.
Public operatorStatic member(ColorHCL to ColorHSV)
Converts the given HCL color to the HSV color space.
Public operatorStatic member(ColorHCV to ColorHSV)
Converts the given HCV color to the HSV color space.
Public operatorStatic member(ColorHCY to ColorHSV)
Converts the given HCY color to the HSV color space.
Public operatorStatic member(ColorHSL to ColorHSV)
Converts the given HSL color to the HSV color space.
Public operatorStatic member(ColorHSV to Vector3)
Converts the specified color to a Vector3, with hue as x, saturation as y, and value as z, while opacity is discarded.
Public operatorStatic member(ColorHSV to Vector4)
Converts the specified color to a Vector4, with hue as x, saturation as y, value as z, and opacity as w.
Public operatorStatic member(ColorHSY to ColorHSV)
Converts the given HSY color to the HSV color space.
Public operatorStatic member(Color to ColorHSV)
Converts the given RGB color to the HSV color space.
Public operatorStatic member(ColorHSV to Color)
Converts the given HSV color to the RGB color space.
Public operatorStatic memberInequality
Checks if the two colors are not equal to each other.
Public operatorStatic memberMultiply(Single, ColorHSV)
Multiplies the color channels of the specified color by the specified value, wrapping the hue channel if necessary.
Public operatorStatic memberMultiply(ColorHSV, ColorHSV)
Multiplies the color channels of the two specified colors together, wrapping the hue channel if necessary.
Public operatorStatic memberMultiply(ColorHSV, 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 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 fields
The color's saturation, in the range [0, 1].
Public fieldv
The color's value, in the range [0, 1].
Top
See Also