Link Search Menu Expand Document

LCh overview

CIE LCh, a polar version of Lab. Note: See documentation for xyz. The same restrictions apply here.

See: https://en.wikipedia.org/wiki/Lab_color_space

Added in v0.1.5


Table of contents


constructors

fromHSLA

Signature

export declare const fromHSLA: (c: HSLA) => LCh

Added in v0.1.5

lch

Signature

export declare const lch: (l: number, c: number, h: number) => LCh

Added in v0.1.5

model

LCh (interface)

Signature

export interface LCh {
  /**
   * The lightness of the color, 0.0 gives absolute black and 100.0 gives the brightest white.
   */
  readonly l: number

  /**
   * Chroma, the colorfulness of the color. It's similar to saturation.
   */
  readonly c: number

  /**
   * A number between `0` and `360` representing the hue of the color in degrees.
   */
  readonly h: Hue
}

Added in v0.1.5

utils

evolve

Signature

export declare const evolve: <
  F extends { readonly l: (a: number) => number; readonly c: (a: number) => number; readonly h: (a: Hue) => number }
>(
  transformations: F
) => (c: LCh) => LCh

Added in v0.1.5

mix

Signature

export declare const mix: (ratio: number) => (a: LCh) => (b: LCh) => LCh

Added in v0.1.5