# Class ThemePalette

java.lang.Object
com.codename1.ui.editor.ThemePalette

public final class ThemePalette extends Object
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.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final ThemePalette`
  `DARK`
  The VS Code style dark palette.
  `static final ThemePalette`
  `LIGHT`
  The GitHub style light palette.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `colorForKind(int kind)`
  Returns the color for the given `Tokenizer` token kind.
  `static ThemePalette`
  `forName(String theme)`
  Returns the palette for the given theme id (`"dark"` returns the dark palette, anything else the light palette).
  `int`
  `getBackground()`
  The editor background color.
  `int`
  `getErrorColor()`
  The error diagnostic color.
  `int`
  `getForeground()`
  The default text color.
  `int`
  `getGutterBackground()`
  The gutter background color.
  `int`
  `getGutterForeground()`
  The gutter text color.
  `int`
  `getInfoColor()`
  The info diagnostic color.
  `int`
  `getSelection()`
  The selection highlight color.
  `int`
  `getWarningColor()`
  The warning diagnostic color.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### LIGHT

    public static final ThemePalette LIGHT
    The GitHub style light palette.

  - ### DARK

    public static final ThemePalette DARK
    The 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.