Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LCH

Implements

Indexable

[id: number]: number

Index

Constructors

constructor

Properties

alpha

alpha: number

buf

buf: NumericArray

Backing array / memory

c

c: number

h

h: number

l

l: number

Readonly length

length: 4

Readonly mode

mode: "lch"

offset

offset: number

Start index in array

Readonly range

range: [ReadonlyVec, ReadonlyVec]

A tuple of [min, max] where both are vectors specifying the min/max channel ranges for this color type.

remarks

Even though there're several color spaces which do not impose limits on at least some of their axes, the limits returned by this function indicate RGB "safe" colors and were determined by projecting all RGB colors into the color space used by this type.

stride

stride: number

Step size between channels

Methods

[iterator]

  • [iterator](): Iterator<number, any, undefined>

clamp

  • Clamps all color channels so that colors is inside RGB gamut.

    remarks

    Note: This is not a 100% guarantee, due to each channel being clamped individually based on pre-determined limits.

    Returns LCH

copy

copyView

  • copyView(): LCH

deref

  • deref(): Vec

empty

eqDelta

  • eqDelta(o: LCH, eps?: number): boolean

randomize

  • randomize(rnd?: IRandom): LCH

set

  • set(src: ReadonlyVec): LCH

toJSON

  • toJSON(): number[]

Generated using TypeDoc