Skip to content
pixi-silk
GitHub repository
Class

OklchPicker

import { OklchPicker } from 'pixi-silk/ui/color';

Perceptual picker: lightness (top to bottom) against chroma (left to right) for one OKLCH hue, with an OKLCH hue strip below. The area outside sRGB is greyed, with its edge drawn, so colours stay picked by how they look, not by how a screen mixes them.

Extends#

Constructors#

Constructor#

new OklchPicker(options?: OklchPickerOptions): OklchPicker;

Parameters#

ParameterType
optionsOklchPickerOptions

Returns#

OklchPicker

Overrides#

ColorPicker.constructor

Properties#

PropertyModifierTypeDescriptionInherited fromDefined in
modelreadonlyColorModelThe colour this picker edits. Share it to link pickers.ColorPicker.modelui/color/ColorPicker.ts:36
statereadonlyColorPickerStateSignals to read. See ColorPickerState.ColorPicker.stateui/color/ColorPicker.ts:38

Accessors#

lch#

Get Signature#

get lch(): OKLCH;

Current OKLCH as this picker sees it (chroma may exceed what sRGB shows). A copy.

Returns

OKLCH

Methods#

destroy()#

destroy(options?: DestroyOptions): void;

Stops the animation and unsubscribes from the model. The model stays usable. Destroys children by default.

Parameters#

ParameterType
options?DestroyOptions

Returns#

void

Inherited from#

ColorPicker.destroy


tick()#

tick(dt: number): boolean;

Advances the animation by dt seconds (only needed with ticker: null). Returns true while moving.

Parameters#

ParameterType
dtnumber

Returns#

boolean

Inherited from#

ColorPicker.tick