MaterialColorUtils

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

Static Methods

AlphaFromArgb(argb: int): int
Returns the alpha component of a color in ARGB format.
ArgbFromLab(l: double, a: double, b: double): int
Converts a color represented in Lab color space into an ARGB integer.
ArgbFromLinrgb(linrgb: double3): int
Converts a color from linear RGB components to ARGB format. Expects linear RGB in the same 0..100 domain as the Dart implementation.
ArgbFromLstar(lstar: double): int
Converts an L* value to an ARGB representation. Returns a grayscale color with matching lightness.
ArgbFromRgb(red: int, green: int, blue: int): int
Converts a color from RGB components to ARGB format.
ArgbFromXyz(x: double, y: double, z: double): int
Converts a color from XYZ to ARGB.
BlueFromArgb(argb: int): int
Returns the blue component of a color in ARGB format.
Delinearized(rgbComponent: double): int
Delinearizes an RGB component. Input: 0..100 Output: 0..255
GreenFromArgb(argb: int): int
Returns the green component of a color in ARGB format.
IsOpaque(argb: int): bool
Returns whether a color in ARGB format is opaque.
LabFromArgb(argb: int): double3
Converts a color from ARGB representation to L*a*b* representation.
Linearized(rgbComponent: int): double
Linearizes an RGB component. Input: 0..255 Output: 0..100
LstarFromArgb(argb: int): double
Computes the L* value of a color in ARGB representation.
LstarFromY(y: double): double
Converts a Y value to an L* value.
RedFromArgb(argb: int): int
Returns the red component of a color in ARGB format.
WhitePointD65(): double3
Returns the standard white point; white on a sunny day.
XyzFromArgb(argb: int): double3
Converts a color from ARGB to XYZ.
YFromLstar(lstar: double): double
Converts an L* value to a Y value.

Inherited Members

On this page