Skip to content

textmode.synth.js / SynthSource / cellColor

Method: cellColor()

Call Signature

ts
cellColor(source): this;

Set the cell background colors using a color source chain.

Parameters

ParameterTypeDescription
sourceSynthSourceA SynthSource producing color values, or RGBA values

Returns

this

The SynthSource for chaining

Example

Call Signature

ts
cellColor(
   r, 
   g?, 
   b?, 
   a?): this;

Set the cell background color using RGBA values.

Parameters

ParameterTypeDescription
rSynthParameterValueRed channel (0-1) or value
g?SynthParameterValueGreen channel (0-1) or value
b?SynthParameterValueBlue channel (0-1) or value
a?SynthParameterValueAlpha channel (0-1) or value

Returns

this

The SynthSource for chaining

Example

Call Signature

ts
cellColor(gray): this;

Set the cell background color using a grayscale value.

Parameters

ParameterTypeDescription
graySynthParameterValueGrayscale value (0-1)

Returns

this

Example