Colors

actual object Colors

Utilities for color space conversions and color temperature calculations.

Colors provides functions to convert between color spaces (sRGB ↔ linear) and to generate colors from color temperatures (in Kelvin). These utilities are useful for proper color handling in rendering and for creating realistic lighting based on physical color temperatures.

expect object Colors

Utilities for color space conversions and color temperature calculations.

Colors provides functions to convert between color spaces (sRGB ↔ linear) and to generate colors from color temperatures (in Kelvin). These utilities are useful for proper color handling in rendering and for creating realistic lighting based on physical color temperatures.

actual object Colors

Utilities for color space conversions and color temperature calculations.

Colors provides functions to convert between color spaces (sRGB ↔ linear) and to generate colors from color temperatures (in Kelvin). These utilities are useful for proper color handling in rendering and for creating realistic lighting based on physical color temperatures.

actual object Colors

Utilities for color space conversions and color temperature calculations.

Colors provides functions to convert between color spaces (sRGB ↔ linear) and to generate colors from color temperatures (in Kelvin). These utilities are useful for proper color handling in rendering and for creating realistic lighting based on physical color temperatures.

actual object Colors

Utilities for color space conversions and color temperature calculations.

Colors provides functions to convert between color spaces (sRGB ↔ linear) and to generate colors from color temperatures (in Kelvin). These utilities are useful for proper color handling in rendering and for creating realistic lighting based on physical color temperatures.

Types

Link copied to clipboard

Conversion quality/accuracy options.

Conversion quality/accuracy options.

Conversion quality/accuracy options.

Conversion quality/accuracy options.

Conversion quality/accuracy options.

Link copied to clipboard
actual enum RgbaType : Enum<Colors.RgbaType>

RGBA color space types (including alpha channel).

expect enum RgbaType : Enum<Colors.RgbaType>

RGBA color space types (including alpha channel).

actual enum RgbaType : Enum<Colors.RgbaType>

RGBA color space types (including alpha channel).

actual enum RgbaType : Enum<Colors.RgbaType>

RGBA color space types (including alpha channel).

actual enum RgbaType : Enum<Colors.RgbaType>

RGBA color space types (including alpha channel).

Link copied to clipboard
actual enum RgbType : Enum<Colors.RgbType>

RGB color space types.

expect enum RgbType : Enum<Colors.RgbType>

RGB color space types.

actual enum RgbType : Enum<Colors.RgbType>

RGB color space types.

actual enum RgbType : Enum<Colors.RgbType>

RGB color space types.

actual enum RgbType : Enum<Colors.RgbType>

RGB color space types.

Functions

Link copied to clipboard
actual fun cct(temperature: Float): FloatArray

Generates an RGB color from a color correlated color temperature (CCT) in Kelvin.

expect fun cct(temperature: Float): FloatArray

Generates an RGB color from a color correlated color temperature (CCT) in Kelvin.

actual fun cct(temperature: Float): FloatArray

Generates an RGB color from a color correlated color temperature (CCT) in Kelvin.

actual fun cct(temperature: Float): FloatArray

Generates an RGB color from a color correlated color temperature (CCT) in Kelvin.

actual fun cct(temperature: Float): FloatArray

Generates an RGB color from a color correlated color temperature (CCT) in Kelvin.

Link copied to clipboard
actual fun illuminantD(temperature: Float): FloatArray

Generates an RGB color for a CIE D (daylight) illuminant at the specified temperature.

expect fun illuminantD(temperature: Float): FloatArray

Generates an RGB color for a CIE D (daylight) illuminant at the specified temperature.

actual fun illuminantD(temperature: Float): FloatArray

Generates an RGB color for a CIE D (daylight) illuminant at the specified temperature.

actual fun illuminantD(temperature: Float): FloatArray

Generates an RGB color for a CIE D (daylight) illuminant at the specified temperature.

actual fun illuminantD(temperature: Float): FloatArray

Generates an RGB color for a CIE D (daylight) illuminant at the specified temperature.

Link copied to clipboard
actual fun toLinear(conversion: Colors.Conversion, rgb: FloatArray): FloatArray

Converts an RGB color from the specified color space to linear RGB using the specified conversion quality.

actual fun toLinear(type: Colors.RgbType, rgb: FloatArray): FloatArray
actual fun toLinear(type: Colors.RgbType, r: Float, g: Float, b: Float): FloatArray

Converts an RGB color from the specified color space to linear RGB.

actual fun toLinear(type: Colors.RgbaType, rgba: FloatArray): FloatArray
actual fun toLinear(type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float): FloatArray

Converts an RGBA color from the specified color space to linear RGB.

expect fun toLinear(conversion: Colors.Conversion, rgb: FloatArray): FloatArray

Converts an RGB color from the specified color space to linear RGB using the specified conversion quality.

expect fun toLinear(type: Colors.RgbType, rgb: FloatArray): FloatArray
expect fun toLinear(type: Colors.RgbType, r: Float, g: Float, b: Float): FloatArray

Converts an RGB color from the specified color space to linear RGB.

expect fun toLinear(type: Colors.RgbaType, rgba: FloatArray): FloatArray
expect fun toLinear(type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float): FloatArray

Converts an RGBA color from the specified color space to linear RGB.

actual fun toLinear(conversion: Colors.Conversion, rgb: FloatArray): FloatArray

Converts an RGB color from the specified color space to linear RGB using the specified conversion quality.

actual fun toLinear(type: Colors.RgbType, rgb: FloatArray): FloatArray
actual fun toLinear(type: Colors.RgbType, r: Float, g: Float, b: Float): FloatArray

Converts an RGB color from the specified color space to linear RGB.

actual fun toLinear(type: Colors.RgbaType, rgba: FloatArray): FloatArray
actual fun toLinear(type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float): FloatArray

Converts an RGBA color from the specified color space to linear RGB.

actual fun toLinear(conversion: Colors.Conversion, rgb: FloatArray): FloatArray

Converts an RGB color from the specified color space to linear RGB using the specified conversion quality.

actual fun toLinear(type: Colors.RgbType, rgb: FloatArray): FloatArray
actual fun toLinear(type: Colors.RgbType, r: Float, g: Float, b: Float): FloatArray

Converts an RGB color from the specified color space to linear RGB.

actual fun toLinear(type: Colors.RgbaType, rgba: FloatArray): FloatArray
actual fun toLinear(type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float): FloatArray

Converts an RGBA color from the specified color space to linear RGB.

actual fun toLinear(conversion: Colors.Conversion, rgb: FloatArray): FloatArray

Converts an RGB color from the specified color space to linear RGB using the specified conversion quality.

actual fun toLinear(type: Colors.RgbType, rgb: FloatArray): FloatArray
actual fun toLinear(type: Colors.RgbType, r: Float, g: Float, b: Float): FloatArray

Converts an RGB color from the specified color space to linear RGB.

actual fun toLinear(type: Colors.RgbaType, rgba: FloatArray): FloatArray
actual fun toLinear(type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float): FloatArray

Converts an RGBA color from the specified color space to linear RGB.