Skip to content
pixi-silk
GitHub repository
Function

writeChannel

import { writeChannel } from 'pixi-silk/ui/color';
function writeChannel(
   model: ColorModel, 
   channel: ColorChannel, 
   t: number, 
   origin?: unknown
): void;

Writes one channel of the model from t 0..1 (clamped), with the scales of readChannel. OKLCH writes reduce chroma to fit sRGB.

Parameters#

ParameterTypeDefault value
modelColorModelundefined
channelColorChannelundefined
tnumberundefined
originunknownnull

Returns#

void