ColorLCHABa

@Serializable
data class ColorLCHABa(    val l: Double,     val c: Double,     val h: Double,     val alpha: Double = 1.0,     val ref: ColorXYZa = ColorXYZa.NEUTRAL) : ColorModel<ColorLCHABa> , ReferenceWhitePoint, ShadableColor<ColorLCHABa> , ChromaColor<ColorLCHABa> , HueShiftableColor<ColorLCHABa> , LuminosityColor<ColorLCHABa> , AlgebraicColor<ColorLCHABa> (source)

The CIELChAB color space is the cylindrical representation of the CIELAB color space.

Parameters

l

luminance, in a range of 0.0 (darkest) to 100.0 (brightest)

c

chroma

h

hue in degrees, where a full rotation is 360.0 degrees

alpha

alpha as a percentage between 0.0 and 1.0

ref

reference white against which the color values are calculated

See also

Constructors

Link copied to clipboard
constructor(l: Double, c: Double, h: Double, alpha: Double = 1.0, ref: ColorXYZa = ColorXYZa.NEUTRAL)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val alpha: Double = 1.0
Link copied to clipboard
val c: Double
Link copied to clipboard
open override val chroma: Double

Represents the chromatic intensity of a color. Chroma is a measure of the color's vividness or strength, typically ranging from neutral gray tones (low chroma) to highly saturated, vivid colors (high chroma). This property can be manipulated to adjust the visual characteristics of the color.

Link copied to clipboard
val h: Double
Link copied to clipboard
open override val hue: Double

Represents the hue component of a color, expressed in degrees.

Link copied to clipboard
val l: Double
Link copied to clipboard
open override val luminosity: Double
Link copied to clipboard
open override val ref: ColorXYZa

Functions

Link copied to clipboard
open operator override fun div(scale: Double): ColorLCHABa
Link copied to clipboard
open operator override fun minus(right: ColorLCHABa): ColorLCHABa
Link copied to clipboard
open override fun mix(other: ColorLCHABa, factor: Double): ColorLCHABa
Link copied to clipboard
open fun mixChroma(target: Double, factor: Double): ColorLCHABa
Link copied to clipboard
open fun mixHue(hue: Double, factor: Double): ColorLCHABa

Mixes the current hue with the specified hue using a linear interpolation factor.

Link copied to clipboard
open fun mixLuminosity(luminosity: Double, factor: Double): ColorLCHABa
Link copied to clipboard
open fun modulateChroma(factor: Double): ColorLCHABa

Adjusts the chroma of the color by scaling it with the specified factor and returns a new instance with the updated chroma value. This method allows for proportionally increasing or decreasing the chromatic intensity of the color.

Link copied to clipboard
open override fun opacify(factor: Double): ColorLCHABa

Returns a copy of the color with the opacity (alpha) multiplied by a factor.

Link copied to clipboard
open operator override fun plus(right: ColorLCHABa): ColorLCHABa
Link copied to clipboard
open override fun shade(factor: Double): ColorLCHABa

Multiply the shade by a factor.

Link copied to clipboard
Link copied to clipboard
open fun shiftChroma(shift: Double): ColorLCHABa

Adjusts the chroma of the color by the specified shift value and returns a new instance with the updated chroma. The resulting chroma is calculated by adding the provided shift value to the current chroma.

Link copied to clipboard
open fun shiftHue(shiftInDegrees: Double): ColorLCHABa

Shift the hue of a color by the given amount of degrees.

Link copied to clipboard
open operator override fun times(scale: Double): ColorLCHABa
Link copied to clipboard

Converts the current color from the LCHABa color space to the LABa color space.

Link copied to clipboard
Link copied to clipboard
open override fun toRGBa(): ColorRGBa

Convert into ColorRGBa.

Link copied to clipboard
open override fun toVector4(): Vector4
Link copied to clipboard

Converts the current color from the LCHABa color space to the XYZa color space.

Link copied to clipboard
open override fun withChroma(chroma: Double): ColorLCHABa

Creates a new instance of the implementing type with the specified chroma value.

Link copied to clipboard
open override fun withHue(hue: Double): ColorLCHABa

Creates a new color instance with the specified hue value.

Link copied to clipboard
open override fun withLuminosity(luminosity: Double): ColorLCHABa