const classafTerminal::AnsiPalette
sys::Obj afTerminal::AnsiPalette
256 ANSI colour palette. Palettes are provided for:
- VGA
- Windows XP
- Mac OS X
- PuTTY
- Xterm
All colours taken from Wikipedia.
- get
@
Operator
Color get(Int index)Gets the colour associated with the given index.
index
should be in the range of 0..255- index
Returns the palette index of the given colour. Note the colour is first converted to a safe colour to ensure this method always returns a value.
- mac
static AnsiPalette mac()
Creates a Mac Terminal palette.
- make
static new make()
Selects the palette according to your OS:
- XP for Windows,
- Mac for sad people,
- XTerm for everyone else.
- putty
static AnsiPalette putty()
Creates a Putty palette.
- safe
Converts the given colour to its nearest in the palette.
- vga
static AnsiPalette vga()
Creates a standard VGA palette.
- xp
static AnsiPalette xp()
Creates an XP CMD prompt palette.
- xterm
static AnsiPalette xterm()
Creates an XTerm palette.