textmode.js / Textmodifier / stroke
Method: stroke()
Call Signature
ts
stroke(): TextmodeColor;Alias for charColor. Current stroke (character) color.
Returns
Current character color.
Example
Call Signature
ts
stroke(gray, alpha?): void;Alias for charColor. Set the stroke (character) color using a grayscale value.
Parameters
| Parameter | Type | Description |
|---|---|---|
gray | number | Grayscale value (0-255) |
alpha? | number | Optional alpha value (0-255) |
Returns
void
Example
Call Signature
ts
stroke(
r,
g,
b,
a?): void;Alias for charColor. Set the stroke (character) color using RGB(A) values.
Parameters
| Parameter | Type | Description |
|---|---|---|
r | number | Red component (0-255) |
g | number | Green component (0-255) |
b | number | Blue component (0-255) |
a? | number | Optional alpha component (0-255) |
Returns
void
Example
Call Signature
ts
stroke(value): void;Alias for charColor. Set the stroke (character) color using a CSS string or TextmodeColor object.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | | string | TextmodeColor | Hex string, rgb()/rgba() string, or an existing color object |
Returns
void