Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SRGB

Implements

Indexable

[id: number]: number

Index

Constructors

constructor

Properties

alpha

alpha: number

b

b: number

buf

buf: NumericArray

Backing array / memory

g

g: number

Readonly length

length: 4

Readonly mode

mode: "srgb"

offset

offset: number

Start index in array

r

r: number

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 SRGB

copy

copyView

deref

  • deref(): Vec

empty

eqDelta

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

randomize

  • randomize(rnd?: IRandom): SRGB

set

  • set(src: ReadonlyVec): SRGB

toJSON

  • toJSON(): number[]

Generated using TypeDoc