public class OpenRGBColor extends Object
| Constructor and Description |
|---|
OpenRGBColor(int red,
int green,
int blue)
Returns an instance of an OpenRGBColor from RGB components
|
| Modifier and Type | Method and Description |
|---|---|
static OpenRGBColor |
fromHexaString(String value)
Returns an instance of an OpenRGBColor from a HSB color components
|
static OpenRGBColor |
fromHSB(float hue,
float saturation,
float brightness)
Returns an instance of an OpenRGBColor from a HSB color components
|
static OpenRGBColor |
fromInt(int value)
Returns an instance of an OpenRGBColor from a color integer value
|
byte |
getBlue() |
byte |
getGreen() |
String |
getHexaString() |
int |
getIntValue()
Gets the color integer value
|
byte |
getRed() |
void |
setBlue(byte blue) |
void |
setGreen(byte green) |
void |
setRed(byte red) |
String |
toString() |
public OpenRGBColor(int red,
int green,
int blue)
red - the red valuegreen - the green valueblue - the blue valuepublic static OpenRGBColor fromInt(int value)
value - the color integer valuepublic static OpenRGBColor fromHSB(float hue, float saturation, float brightness)
hue - the HSB color hue (0-360)saturation - the HSB color saturation (0-1)brightness - the HSB color brightness/value (0-1)public static OpenRGBColor fromHexaString(String value)
value - the hexadecimal string valuepublic int getIntValue()
public String getHexaString()
public byte getRed()
public void setRed(byte red)
public byte getGreen()
public void setGreen(byte green)
public byte getBlue()
public void setBlue(byte blue)
Copyright © 2021. All rights reserved.