public final class ThemePalette
- Object
- ThemePalette
The color palette for the pure code editor, mirroring the light (GitHub style) and dark (VS Code
style) themes used by the previous
BrowserComponent backend so switching backends is visually
consistent.Fields
public static final ThemePalette LIGHT | The GitHub style light palette. |
public static final ThemePalette DARK | The VS Code style dark palette. |
Methods
public static ThemePalette forName(String theme) | Returns the palette for the given theme id ("dark" returns the dark palette, anything else the light palette). |
public int colorForKind(int kind) | Returns the color for the given Tokenizer token kind. |
public int getBackground() | The editor background color. |
public int getForeground() | The default text color. |
public int getSelection() | The selection highlight color. |
public int getGutterBackground() | The gutter background color. |
public int getGutterForeground() | The gutter text color. |
public int getErrorColor() | The error diagnostic color. |
public int getWarningColor() | The warning diagnostic color. |
public int getInfoColor() | The info diagnostic color. |
Inherited methods
Field details
LIGHT
public static final ThemePalette LIGHTThe GitHub style light palette.
DARK
public static final ThemePalette DARKThe VS Code style dark palette.
Method details
forName
public static ThemePalette forName(String theme)Returns the palette for the given theme id (
"dark" returns the dark palette, anything else the
light palette).colorForKind
public int colorForKind(int kind)Returns the color for the given
Tokenizer token kind.getBackground
public int getBackground()The editor background color.
getForeground
public int getForeground()The default text color.
getSelection
public int getSelection()The selection highlight color.
getGutterBackground
public int getGutterBackground()The gutter background color.
getGutterForeground
public int getGutterForeground()The gutter text color.
getErrorColor
public int getErrorColor()The error diagnostic color.
getWarningColor
public int getWarningColor()The warning diagnostic color.
getInfoColor
public int getInfoColor()The info diagnostic color.