Class ColorHelpers
The control utility methods.
Inherited Members
Namespace: Evergine.Common.Helpers
Assembly: Evergine.Common.dll
Syntax
public static class ColorHelpers
Methods
CCTToLinear(float, out Vector3)
Convert from correlated color temperature to linear color space.
Declaration
public static void CCTToLinear(float temperature, out Vector3 linear)
Parameters
Type | Name | Description |
---|---|---|
float | temperature | The color temperature in K (Kelvin). |
Vector3 | linear | The converted linear color. |
GammaToLinear(ref Vector3, out Vector3)
Convert a gamma color to linear space.
Declaration
public static void GammaToLinear(ref Vector3 gamma, out Vector3 linear)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | gamma | The gamma color. |
Vector3 | linear | The converted linear color. |
GammaToLinear(Vector4, out Vector4)
Convert a gamma color to linear space.
Declaration
public static void GammaToLinear(Vector4 gamma, out Vector4 linear)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | gamma | The gamma color. |
Vector4 | linear | The converted linear color. |
GammaToLinear(ref Vector4, out Vector4)
Convert a gamma color to linear space.
Declaration
public static void GammaToLinear(ref Vector4 gamma, out Vector4 linear)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | gamma | The gamma color. |
Vector4 | linear | The converted linear color. |
GammaToLinear(float)
Convert a gamma color to linear space.
Declaration
public static float GammaToLinear(float gamma)
Parameters
Type | Name | Description |
---|---|---|
float | gamma | The gamma color. |
Returns
Type | Description |
---|---|
float | The converted linear color. |
LinearToGamma(Vector3, out Vector3)
Convert a linear color to gamma space.
Declaration
public static void LinearToGamma(Vector3 linear, out Vector3 gamma)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | linear | The color in linear space. |
Vector3 | gamma | The converted gamma color. |
LinearToGamma(ref Vector4, out Vector4)
Convert a linear color to gamma space.
Declaration
public static void LinearToGamma(ref Vector4 linear, out Vector4 gamma)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | linear | The color in linear space. |
Vector4 | gamma | The converted gamma color. |
LinearToGamma(float)
Convert a linear color to gamma space.
Declaration
public static float LinearToGamma(float linear)
Parameters
Type | Name | Description |
---|---|---|
float | linear | The color in linear space. |
Returns
Type | Description |
---|---|
float | The converted gamma color. |