public class SyntaxStyle extends Object
UI-agnostic visual style attached to a syntax-highlighted token span.
Tracks foreground/background RGB components and text attributes (bold, underline, italic, inverse) independently from any specific rendering backend (terminal, GUI canvas, or HTML).
import klyn.code.highlighters style = SyntaxStyle(86, 156, 214, 0, 0, 0, true) assert style.bold
| Modifier and Type | Member | Description |
|---|---|---|
| public | bgBluebgBlue as Int = 0 |
No summary. |
| public | bgGreenbgGreen as Int = 0 |
No summary. |
| public | bgRedbgRed as Int = 0 |
No summary. |
| public | boldbold as Boolean = false |
No summary. |
| public | fgBluefgBlue as Int = 235 |
No summary. |
| public | fgGreenfgGreen as Int = 225 |
No summary. |
| public | fgRedfgRed as Int = 215 |
No summary. |
| public | inverseinverse as Boolean = false |
No summary. |
| public | italicitalic as Boolean = false |
No summary. |
| public | underlineunderline as Boolean = false |
No summary. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | SyntaxStyle | Builds a syntax style with explicit RGB colors and text attributes. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | assignassign(other as SyntaxStyle) as Void |
Copies all style attributes from other into this instance. |
| public static | basebase() as SyntaxStyle |
Returns the default base syntax style for plain text. |
| public | copycopy() as SyntaxStyle |
Returns an independent copy of this style. |
| public | sameAssameAs(other as SyntaxStyle) as Boolean |
Returns true when both styles describe the exact same visual state. |
| public | setBackground | Updates the background RGB color components. |
| public | setForeground | Updates the foreground RGB color components. |
| public static | terminalBaseterminalBase() as SyntaxStyle |
Alias for SyntaxStyle.base() preserved for compatibility with terminal callers. |
| public | toAnsitoAnsi() as String |
Serializes the style to a full 24-bit ANSI SGR escape sequence. |
| public override | toStringtoString() as String |
Returns a human-readable diagnostic representation of this style. |