Package de.linusdev.lutils.color
Interface RGBAColor
- All Superinterfaces:
Color,Simplifiable
- All Known Implementing Classes:
RGBAColorDoubleImpl,RGBAColorIntImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final doublestatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull SGRaddToSgrAsBackground(@NotNull SGR sgr) default @NotNull SGRaddToSgrAsForeground(@NotNull SGR sgr) doublealpha()Alpha value of this color as double.doubleblue()Blue value of this color as double.intgetAlpha()Alpha value of this color as int.intgetBlue()Blue value of this color as int.intgetGreen()Green value of this color as int.intgetRed()Red value of this color as int.doublegreen()Green value of this color as double.doublered()Red value of this color as double.default @NotNull Integersimplify()default @NotNull HSVAColordefault ColorReturns this color asColor.default @NotNull RGBAColordefault intReturns a hex color with the format:#rrggbbaa.default inttoRGBHex()Returns a hex color with the format:#00rrggbb.
-
Field Details
-
RGB_INT_MIN
static final int RGB_INT_MIN- See Also:
-
RGB_INT_MAX
static final int RGB_INT_MAX- See Also:
-
RGB_DOUBLE_MIN
static final double RGB_DOUBLE_MIN- See Also:
-
RGB_DOUBLE_MAX
static final double RGB_DOUBLE_MAX- See Also:
-
-
Method Details
-
getRed
int getRed()- Returns:
- red value of this color
-
getGreen
int getGreen()- Returns:
- green value of this color
-
getBlue
int getBlue()- Returns:
- blue value of this color
-
getAlpha
int getAlpha()- Returns:
- alpha value of this color
-
red
double red()- Returns:
- red value of this color
-
green
double green()- Returns:
- green value of this color
-
blue
double blue()- Returns:
- blue value of this color
-
alpha
double alpha()- Returns:
- alpha value of this color
-
toRGBAHex
default int toRGBAHex()Returns a hex color with the format:#rrggbbaa.- Returns:
- this color as rgba hex.
-
toRGBHex
default int toRGBHex()Returns a hex color with the format:#00rrggbb.- Returns:
- this color as rgb hex.
-
toJavaAwtColor
Returns this color asColor. Uses the int color values for the conversion. -
addToSgrAsForeground
-
addToSgrAsBackground
-
simplify
- Specified by:
simplifyin interfaceSimplifiable- Returns:
- must return Byte, Short, Integer, Long, Float, Double, Boolean or something that the method,
that accepts a
Simplifiablespecifies.
-
toRGBAColor
Description copied from interface:ColorThisColorconverted toRGBAColor. If this is already aRGBAColor, this object itself may be returned.- Specified by:
toRGBAColorin interfaceColor- Returns:
RGBAColor
-
toHSVAColor
Description copied from interface:ColorThisColorconverted toHSVAColor. If this is already aHSVAColor, this object itself may be returned.- Specified by:
toHSVAColorin interfaceColor- Returns:
HSVAColor
-