ColorUtils

object ColorUtils

Color science utilities.

Utility methods for color science constants and color space conversions that aren't HCT or CAM16.

Functions

Link copied to clipboard

Converts a color represented in Lab color space into an ARGB integer.

Link copied to clipboard

Converts a color from linear RGB components to ARGB format.

Link copied to clipboard
fun argbFromLstar(lstar: Double): Int

Converts an L* value to an ARGB representation.

Link copied to clipboard
fun argbFromRgb(red: Int, green: Int, blue: Int): Int

Converts a color from RGB components to ARGB format.

Link copied to clipboard

Converts a color from ARGB to XYZ.

Link copied to clipboard
fun blueFromArgb(argb: Int): Int

Returns the blue component of a color in ARGB format.

Link copied to clipboard

Returns the luminance of a color in ARGB format.

Link copied to clipboard
fun delinearized(rgbComponent: Double): Int

Delinearizes an RGB component.

Link copied to clipboard
fun greenFromArgb(argb: Int): Int

Returns the green component of a color in ARGB format.

Link copied to clipboard
fun labF(t: Double): Double

The labF function.

Link copied to clipboard

Converts a color from ARGB representation to Lab* representation.

Link copied to clipboard

Inverse of the labF function.

Link copied to clipboard
fun linearized(rgbComponent: Int): Double

Linearizes an RGB component.

Link copied to clipboard

Computes the L* value of a color in ARGB representation.

Link copied to clipboard

Converts a Y value to an L* value.

Link copied to clipboard
fun redFromArgb(argb: Int): Int

Returns the red component of a color in ARGB format.

Link copied to clipboard

Returns the standard white point; white on a sunny day.

Link copied to clipboard

Converts a color from ARGB to XYZ.

Link copied to clipboard
fun yFromLstar(lstar: Double): Double

Converts an L* value to a Y value.