Interface ComponentColor
@Immutable
public interface ComponentColor
An immutable representation of a color for components.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ComponentColorstatic final ComponentColorstatic final ComponentColorstatic final ComponentColorstatic final ComponentColorstatic final ComponentColorstatic final ComponentColorstatic final ComponentColorstatic final ComponentColor -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentColorfrom(arc.graphics.Color color) Creates a new color from the given Arc color.static ComponentColorCreates a new color from the given AWT color.default intgetB()Returns the blue value of this color.default intgetG()Returns the green value of this color.default intgetR()Returns the red value of this color.intgetRGB()Returns the RGB value of this color.static ComponentColorrgb(int rgb) Creates a new color from the given RGB value.static ComponentColorrgb(int r, int g, int b) Creates a new color from the given RGB values.
-
Field Details
-
RED
-
GREEN
-
BLUE
-
YELLOW
-
CYAN
-
MAGENTA
-
WHITE
-
BLACK
-
ACCENT
-
-
Method Details
-
rgb
Creates a new color from the given RGB value.- Parameters:
rgb- the RGB value- Returns:
- the component color
-
rgb
Creates a new color from the given RGB values.- Parameters:
r- the red valueg- the green valueb- the blue value- Returns:
- the component color
-
from
Creates a new color from the given AWT color.- Parameters:
color- the AWT color- Returns:
- the component color
-
from
Creates a new color from the given Arc color.- Parameters:
color- the Arc color- Returns:
- the component color
-
getRGB
int getRGB()Returns the RGB value of this color. -
getR
default int getR()Returns the red value of this color. -
getG
default int getG()Returns the green value of this color. -
getB
default int getB()Returns the blue value of this color.
-