Class Ansi.Color
java.lang.Object
com.codename1.cli.Ansi.Color
- Enclosing class:
Ansi
A foreground or background color: one of the 16 basic colors, an
index into the 256-color palette, or a 24-bit RGB value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Ansi.ColorBlack.static final Ansi.ColorBlue.static final Ansi.ColorBright blue.static final Ansi.ColorBright cyan.static final Ansi.ColorBright green.static final Ansi.ColorBright magenta.static final Ansi.ColorBright red.static final Ansi.ColorBright white.static final Ansi.ColorBright yellow.static final Ansi.ColorCyan.static final Ansi.ColorThe terminal's own default color.static final Ansi.ColorBright black, which terminals show as gray.static final Ansi.ColorGreen.static final Ansi.ColorMagenta.static final Ansi.ColorRed.static final Ansi.ColorWhite.static final Ansi.ColorYellow. -
Method Summary
Modifier and TypeMethodDescriptionstatic Ansi.ColorA color written#rrggbborrrggbb.static Ansi.Colorindexed(int index) Entryindex(0-255) of the 256-color palette.static Ansi.Colorrgb(int r, int g, int b) A 24-bit color; each component is clamped to 0-255.
-
Field Details
-
BLACK
Black. -
RED
Red. -
GREEN
Green. -
YELLOW
Yellow. -
BLUE
Blue. -
MAGENTA
Magenta. -
CYAN
Cyan. -
WHITE
White. -
GRAY
Bright black, which terminals show as gray. -
BRIGHT_RED
Bright red. -
BRIGHT_GREEN
Bright green. -
BRIGHT_YELLOW
Bright yellow. -
BRIGHT_BLUE
Bright blue. -
BRIGHT_MAGENTA
Bright magenta. -
BRIGHT_CYAN
Bright cyan. -
BRIGHT_WHITE
Bright white. -
DEFAULT
The terminal's own default color.
-
-
Method Details
-
rgb
A 24-bit color; each component is clamped to 0-255. -
hex
A color written
#rrggbborrrggbb.Throws
IllegalArgumentException: whenhexis not six hex digits.
-
indexed
Entryindex(0-255) of the 256-color palette.
-