Link Search Menu Expand Document

Lab overview

A Color represented L, a and b coordinates in the Lab color space.

Note: See documentation for xyz. The same restrictions apply here.

Added in v0.1.5


Table of contents


constructors

fromHSLA

Signature

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

Added in v0.1.5

fromLCh

Signature

export declare const fromLCh: ({ l, c, h }: LCh) => Lab

Added in v0.1.5

lab

Signature

export declare const lab: (l: number, a: number, b: number) => Lab

Added in v0.1.5

model

Lab (interface)

Signature

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

  readonly a: number

  readonly b: number
}

Added in v0.1.5

utils

evolve

Signature

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

Added in v0.1.5

mix

Signature

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

Added in v0.1.5