Api ColorHsv
struct

ColorHsv

public sealed struct ColorHsv

A color in Hue-Saturation-Value/Brightness format.

Constructors

ColorHsv(Single h, Single s, Single v, Single a)

Initializes a new HSV/HSB color. Hue is in the range of [0-360] and all other values are in range [0,1]

h — The hue color component.
s — Saturation of the color.
v — Brightness of the color.
a — Alpha of the color.

Properties

Name Type Description
Hue Single Hue component of this color in range 0 to 360.
Saturation Single Saturation of this color in range 0 (white) to 1 (full color).
Value Single Brightness of this color in range 0 (black) to 1 (full color).
Alpha Single Transparency of this color in range 0 (fully transparent) to 1 (fully opaque).

Methods

Color ToColor()

Convert this object to Color.

returns — The converted color struct.
ColorHsv WithHue(Single hue)

Returns a copy of this color with given Hue value.

hue — The Hue override.
returns — The new color.
ColorHsv WithSaturation(Single saturation)

Returns a copy of this color with given Saturation value.

saturation — The Saturation override.
returns — The new color.
ColorHsv WithValue(Single value)

Returns a copy of this color with given Brightness value.

value — The Brightness override.
returns — The new color.
ColorHsv WithAlpha(Single alpha)

Returns a copy of this color with given alpha value.

alpha — The alpha override.
returns — The new color.
Assembly: Sandbox.System Full Name: ColorHsv