Package civitas.celestis.graphics
Class Colors
java.lang.Object
civitas.celestis.graphics.Colors
Contains utility methods and constant values related to AWT
Colors.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color black.static final Colorstatic final ColorThe color blue.static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color cyan.static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color dark green.static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color gray.static final ColorThe color green.static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color magenta.static final ColorThe color maroon.static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color navy.static final Colorstatic final ColorThe color olive.static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color purple.static final ColorThe color red.static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color silver.static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color teal.static final Colorstatic final Colorstatic final Colorstatic final Colorstatic final Colorstatic final ColorThe color white.static final Colorstatic final ColorThe color yellow.static final Color -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorPerforms Bezier interpolation between the starting colorsand the ending colore, using the interpolation parametert.static ColorReturns the inverse of the provided colorc.static ColorPerforms linear interpolation (LERP) between the starting colorsand the ending colore, using the interpolation parametert.static Colorrandom()Returns a new random opaque color.static StringSerializes a color into a string.
-
Field Details
-
WHITE
The color white. -
BLACK
The color black. -
RED
The color red. -
GREEN
The color green. -
BLUE
The color blue. -
YELLOW
The color yellow. -
CYAN
The color cyan. -
MAGENTA
The color magenta. -
SILVER
The color silver. -
GRAY
The color gray. -
MAROON
The color maroon. -
OLIVE
The color olive. -
DARK_GREEN
The color dark green. -
PURPLE
The color purple. -
TEAL
The color teal. -
NAVY
The color navy. -
DARK_RED
-
BROWN
-
FIREBRICK
-
CRIMSON
-
TOMATO
-
CORAL
-
INDIAN_RED
-
LIGHT_CORAL
-
DARK_SALMON
-
SALMON
-
LIGHT_SALMON
-
ORANGE_RED
-
DARK_ORANGE
-
ORANGE
-
GOLD
-
DARK_GOLDEN_ROD
-
GOLDEN_ROD
-
PALE_GOLDEN_ROD
-
DARK_KHAKI
-
KHAKI
-
YELLOW_GREEN
-
DARK_OLIVE_GREEN
-
OLIVE_DRAB
-
LAWN_GREEN
-
CHARTREUSE
-
GREEN_YELLOW
-
FOREST_GREEN
-
LIME
-
LIME_GREEN
-
LIGHT_GREEN
-
PALE_GREEN
-
DARK_SEA_GREEN
-
MEDIUM_SPRING_GREEN
-
SPRING_GREEN
-
SEA_GREEN
-
MEDIUM_AQUA_MARINE
-
MEDIUM_SEA_GREEN
-
LIGHT_SEA_GREEN
-
DARK_SLATE_GRAY
-
DARK_CYAN
-
AQUA
-
LIGHT_CYAN
-
DARK_TURQUOISE
-
TURQUOISE
-
MEDIUM_TURQUOISE
-
PALE_TURQUOISE
-
AQUA_MARINE
-
POWDER_BLUE
-
CADET_BLUE
-
STEEL_BLUE
-
CORNFLOWER_BLUE
-
DEEP_SKY_BLUE
-
DODGER_BLUE
-
LIGHT_BLUE
-
SKY_BLUE
-
LIGHT_SKY_BLUE
-
MIDNIGHT_BLUE
-
DARK_BLUE
-
MEDIUM_BLUE
-
ROYAL_BLUE
-
BLUE_VIOLET
-
INDIGO
-
DARK_SLATE_BLUE
-
SLATE_BLUE
-
MEDIUM_SLATE_BLUE
-
MEDIUM_PURPLE
-
DARK_MAGENTA
-
DARK_VIOLET
-
DARK_ORCHID
-
MEDIUM_ORCHID
-
THISTLE
-
PLUM
-
VIOLET
-
ORCHID
-
MEDIUM_VIOLET_RED
-
PALE_VIOLET_RED
-
DEEP_PINK
-
HOT_PINK
-
LIGHT_PINK
-
PINK
-
ANTIQUE_WHITE
-
BEIGE
-
BISQUE
-
BLANCHED_ALMOND
-
WHEAT
-
CORN_SILK
-
LEMON_CHIFFON
-
LIGHT_GOLDEN_ROD_YELLOW
-
LIGHT_YELLOW
-
SADDLE_BROWN
-
SIENNA
-
CHOCOLATE
-
PERU
-
SANDY_BROWN
-
BURLY_WOOD
-
TAN
-
ROSY_BROWN
-
MOCCASIN
-
NAVAJO_WHITE
-
PEACH_PUFF
-
MISTY_ROSE
-
LAVENDER_BLUSH
-
LINEN
-
OLD_LACE
-
PAPAYA_WHIP
-
SEA_SHELL
-
MINT_CREAM
-
SLATE_GRAY
-
LIGHT_SLATE_GRAY
-
LIGHT_STEEL_BLUE
-
LAVENDER
-
FLORAL_WHITE
-
ALICE_BLUE
-
GHOST_WHITE
-
HONEYDEW
-
IVORY
-
AZURE
-
SNOW
-
DIM_GRAY
-
DARK_GRAY
-
LIGHT_GRAY
-
GAINSBORO
-
WHITE_SMOKE
-
-
Constructor Details
-
Colors
public Colors()
-
-
Method Details
-
toString
Serializes a color into a string.- Parameters:
c- The color of which to serialize- Returns:
- The string representation of the provided color
c
-
random
Returns a new random opaque color.- Returns:
- A new random opaque color
-
inverse
Returns the inverse of the provided colorc.- Parameters:
c- The color of which to get the inverse of- Returns:
- The inverse of the provided color
c
-
lerp
Performs linear interpolation (LERP) between the starting colorsand the ending colore, using the interpolation parametert.- Parameters:
s- The starting color of which to start the interpolation ate- The ending color of which to end the interpolation att- The interpolation parameter ([0, 1])- Returns:
- The interpolated color
-
bezier
Performs Bezier interpolation between the starting colorsand the ending colore, using the interpolation parametert.- Parameters:
s- The starting color of which to start the interpolation ate- The ending color of which to end the interpolation att- The interpolation parameter ([0, 1])- Returns:
- The interpolated color
-