ColorUtils

open class 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
open fun alphaFromArgb(argb: Int): Int
Returns the alpha component of a color in ARGB format.
Link copied to clipboard
open fun argbFromLab(l: Double, a: Double, b: Double): Int
Converts a color represented in Lab color space into an ARGB integer.
Link copied to clipboard
open fun argbFromLinrgb(linrgb: Array<Double>): Int
Converts a color from linear RGB components to ARGB format.
Link copied to clipboard
open fun argbFromLstar(lstar: Double): Int
Converts an L* value to an ARGB representation.
Link copied to clipboard
open fun argbFromRgb(red: Int, green: Int, blue: Int): Int
Converts a color from RGB components to ARGB format.
Link copied to clipboard
open fun argbFromXyz(x: Double, y: Double, z: Double): Int
Converts a color from ARGB to XYZ.
Link copied to clipboard
open fun blueFromArgb(argb: Int): Int
Returns the blue component of a color in ARGB format.
Link copied to clipboard
open fun delinearized(rgbComponent: Double): Int
Delinearizes an RGB component.
Link copied to clipboard
open fun greenFromArgb(argb: Int): Int
Returns the green component of a color in ARGB format.
Link copied to clipboard
open fun isOpaque(argb: Int): Boolean
Returns whether a color in ARGB format is opaque.
Link copied to clipboard
open fun labFromArgb(argb: Int): Array<Double>
Converts a color from ARGB representation to L*a*b* representation.
Link copied to clipboard
open fun linearized(rgbComponent: Int): Double
Linearizes an RGB component.
Link copied to clipboard
open fun lstarFromArgb(argb: Int): Double
Computes the L* value of a color in ARGB representation.
Link copied to clipboard
open fun lstarFromY(y: Double): Double
Converts a Y value to an L* value.
Link copied to clipboard
open 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
open fun xyzFromArgb(argb: Int): Array<Double>
Converts a color from XYZ to ARGB.
Link copied to clipboard
open fun yFromLstar(lstar: Double): Double
Converts an L* value to a Y value.