Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • HCY

Implements

Indexable

[id: number]: number

Index

Constructors

constructor

Properties

alpha

alpha: number

buf

buf: number[] | TypedArray

Backing array / memory

c

c: number

h

h: number

Readonly length

length: 4

Readonly mode

mode: "hcy"

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

y

y: number

Methods

[Symbol.iterator]

  • [Symbol.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 HCY

copy

copyView

  • copyView(): HCY

deref

  • deref(): Vec

empty

eqDelta

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

randomize

  • randomize(rnd?: IRandom): HCY

set

  • set(src: ReadonlyVec): HCY

toJSON

  • toJSON(): number[]

Generated using TypeDoc