textmode.synth.js / SynthSource / charColor
Method: charColor()
Call Signature
ts
charColor(source): this;Set the character foreground color using a color source chain.
Parameters
| Parameter | Type | Description |
|---|---|---|
source | SynthSource | A SynthSource producing color values, or RGBA values |
Returns
this
The SynthSource for chaining
Example
Call Signature
ts
charColor(
r,
g?,
b?,
a?): this;Set the character foreground color using RGBA values.
Parameters
| Parameter | Type | Description |
|---|---|---|
r | SynthParameterValue | Red channel (0-1) or value |
g? | SynthParameterValue | Green channel (0-1) or value |
b? | SynthParameterValue | Blue channel (0-1) or value |
a? | SynthParameterValue | Alpha channel (0-1) or value |
Returns
this
The SynthSource for chaining
Example
Call Signature
ts
charColor(gray): this;Set the character foreground color using a grayscale value.
Parameters
| Parameter | Type | Description |
|---|---|---|
gray | SynthParameterValue | Grayscale value (0-1) |
Returns
this