public class Color
Represents color for class AliasColors
.
class AliasColors
Modifier and Type | Class and Description |
---|---|
static class |
Color.Companion |
Modifier and Type | Field and Description |
---|---|
static Color.Companion |
Companion |
Constructor and Description |
---|
Color(int red,
int green,
int blue)
Represents color for
class AliasColors . |
Color(int rgb)
Constructs
class Color from integer representation where: |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asHexString()
Returns color string representation in hexadecimal form: 6 hexadecimal chars prepended by #.
|
java.lang.String |
asRgbaString()
Returns color string representation in RGBa format:
|
java.lang.String |
asString()
Alias for
Color.asHexString . |
int |
component1() |
int |
component2() |
int |
component3() |
Color |
copy(int red,
int green,
int blue)
Represents color for
class AliasColors . |
boolean |
equals(java.lang.Object p) |
int |
getBlue() |
int |
getGreen() |
int |
getRed() |
int |
hashCode() |
java.lang.String |
toString() |
public static Color.Companion Companion
public Color(int red, int green, int blue)
Represents color for class AliasColors
.
class AliasColors
public Color(int rgb)
Constructs class Color
from integer representation where:
bits from 24 to 31 are ignored
bits from 16 to 23 are red color component
bits from 8 to 15 are blue color component
bits from 0 to 7 are green color component
class Color
public java.lang.String asString()
Alias for Color.asHexString
.
Color.asHexString
public java.lang.String asHexString()
Returns color string representation in hexadecimal form: 6 hexadecimal chars prepended by #.
first 2 hex chars are red color component second 2 hex chars are blue color component third 2 hex chars are green color component
public java.lang.String asRgbaString()
Returns color string representation in RGBa format:
rgba(int(red), int(green), int(blue), 1)
Note that 4th component of this format is always 1
and can't be changes now.
public int getRed()
public int getGreen()
public int getBlue()
public int component1()
public int component2()
public int component3()
public Color copy(int red, int green, int blue)
Represents color for class AliasColors
.
class AliasColors
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)