textmode.synth.js / paint
Function: paint()
Call Signature
ts
function paint(source): SynthSource;Create a synth source with both character and cell colors defined.
This function creates a SynthSource where both the character foreground color and the cell background color are driven by the same source pattern.
Accepts either a SynthSource (pattern) or RGBA values (solid color).
Parameters
| Parameter | Type | Description |
|---|---|---|
source | SynthSource | A SynthSource producing color values |
Returns
A new SynthSource configured with both color sources
Example
Call Signature
ts
function paint(
r,
g?,
b?,
a?): SynthSource;Create a synth source with both character and cell colors defined 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
A new SynthSource configured with both color sources
Example
Call Signature
ts
function paint(gray): SynthSource;Create a synth source with both character and cell colors defined using a grayscale value.
Parameters
| Parameter | Type | Description |
|---|---|---|
gray | SynthParameterValue | Grayscale value (0-1) |