textmode.js / color / TextmodeColor
Class: TextmodeColor
Color value used by textmode drawing APIs.
Values are stored as 0-255 integers for compatibility with public APIs. Normalized versions are also available for shader uploads.
Use Textmodifier.color to create colors.
Example
Properties
| Property | Description |
|---|---|
| a | Alpha component (0-255). |
| b | Blue component (0-255). |
| g | Green component (0-255). |
| r | Red component (0-255). |
Accessors
| Accessor | Description |
|---|---|
| normalized | Normalized (0-1) RGBA tuple. |
| rgb | Plain RGB tuple with integer components. |
| rgba | Plain RGBA tuple with integer components. |
Methods
| Method | Description |
|---|---|
| withAlpha | Create a copy of this color with a different alpha value. |