public class LibgdxColor extends java.lang.Object implements Color
| Modifier and Type | Field and Description |
|---|---|
com.badlogic.gdx.graphics.Color |
color |
| Constructor and Description |
|---|
LibgdxColor(byte r,
byte g,
byte b,
byte a) |
LibgdxColor(com.badlogic.gdx.graphics.Color color) |
LibgdxColor(float r,
float g,
float b,
float a) |
LibgdxColor(int rgba8888) |
LibgdxColor(int r,
int g,
int b,
int a) |
| Modifier and Type | Method and Description |
|---|---|
float |
ab() |
Color |
add(byte r,
byte g,
byte b,
byte a)
Adds RGBA components to this
Color |
Color |
add(Color color)
|
Color |
add(float r,
float g,
float b,
float a)
Adds RGBA components to this
Color |
float |
af() |
int |
argb8888()
Returns the color value in ARGB8888 format
|
float |
bb() |
float |
bf() |
int |
bgr565()
Returns the color value in BGR565 format
|
int |
bgra4444()
Returns the color value in BGR4444 format
|
Color |
copy()
|
boolean |
equals(Color color)
|
boolean |
equals(java.lang.Object o) |
float |
gb() |
byte |
getAAsByte()
Returns the alpha component of this
Color |
float |
getAAsFloat()
Returns the alpha component of this
Color |
byte |
getBAsByte()
Returns the blue component of this
Color |
float |
getBAsFloat()
Returns the blue component of this
Color |
byte |
getGAsByte()
Returns the green component of this
Color |
float |
getGAsFloat()
Returns the green component of this
Color |
byte |
getRAsByte()
Returns the red component of this
Color |
float |
getRAsFloat()
Returns the red component of this
Color |
float |
gf() |
int |
hashCode() |
Color |
lerp(byte r,
byte g,
byte b,
byte a,
float t)
Linearly interpolates between this color and the target color by t
|
Color |
lerp(Color color,
float t)
Linearly interpolates between this color and the target color by t
|
Color |
lerp(float r,
float g,
float b,
float a,
float t)
Linearly interpolates between this color and the target color by t
|
Color |
multiply(byte r,
byte g,
byte b,
byte a)
Multiplies this
Color by the given RGBA components |
Color |
multiply(Color color)
|
Color |
multiply(float multiplier)
Multiplies this
Color by the given multiplier |
Color |
multiply(float r,
float g,
float b,
float a)
Multiplies this
Color by the given RGBA components |
float |
rb() |
float |
rf() |
int |
rgb565()
Returns the color value in RGB565 format
|
int |
rgb888()
Returns the color value in RGB888 format
|
int |
rgba4444()
Returns the color value in RGBA4444 format
|
int |
rgba8888()
Returns the color value in RBGA8888 format
|
Color |
set(byte r,
byte g,
byte b,
byte a)
Sets the RGBA components
|
Color |
set(Color color)
|
Color |
set(float r,
float g,
float b,
float a)
Sets the RGBA components
|
void |
setA(byte a) |
void |
setA(float a)
Sets the alpha component
|
void |
setB(byte b) |
void |
setB(float b)
Sets the blue component
|
void |
setG(byte g) |
void |
setG(float g)
Sets the green component
|
void |
setR(byte r) |
void |
setR(float r)
Sets the red component
|
Color |
subtract(byte r,
byte g,
byte b,
byte a)
Subtracts RGBA components from this
Color |
Color |
subtract(Color color)
|
Color |
subtract(float r,
float g,
float b,
float a)
Subtracts RGBA components from this
Color |
public LibgdxColor(int rgba8888)
public LibgdxColor(int r,
int g,
int b,
int a)
public LibgdxColor(float r,
float g,
float b,
float a)
public LibgdxColor(byte r,
byte g,
byte b,
byte a)
public LibgdxColor(com.badlogic.gdx.graphics.Color color)
public Color set(float r, float g, float b, float a)
Colorpublic Color set(byte r, byte g, byte b, byte a)
Colorpublic Color add(float r, float g, float b, float a)
ColorColorpublic Color add(byte r, byte g, byte b, byte a)
ColorColorpublic Color multiply(float r, float g, float b, float a)
ColorColor by the given RGBA componentspublic Color multiply(byte r, byte g, byte b, byte a)
ColorColor by the given RGBA componentspublic Color multiply(float multiplier)
ColorColor by the given multiplierpublic Color subtract(float r, float g, float b, float a)
ColorColorpublic Color subtract(byte r, byte g, byte b, byte a)
ColorColorpublic Color lerp(Color color, float t)
Colorpublic Color lerp(float r, float g, float b, float a, float t)
Colorlerp in interface Colorr - The red component of the target Color (A value between 0.0. and 1.0)g - The green component of the target Color (A value between 0.0. and 1.0)b - The blue component of the target Color (A value between 0.0. and 1.0)a - The alpha component of the target Color (A value between 0.0. and 1.0)t - The interpolation coefficientColor for chainingpublic Color lerp(byte r, byte g, byte b, byte a, float t)
Colorlerp in interface Colorr - The red component of the target Color (A value between 0 and 255)g - The green component of the target Color (A value between 0 and 255)b - The blue component of the target Color (A value between 0 and 255)a - The alpha component of the target Color (A value between 0 and 255)t - The interpolation coefficientColor for chainingpublic float getRAsFloat()
ColorColorgetRAsFloat in interface Colorpublic float getGAsFloat()
ColorColorgetGAsFloat in interface Colorpublic float getBAsFloat()
ColorColorgetBAsFloat in interface Colorpublic float getAAsFloat()
ColorColorgetAAsFloat in interface Colorpublic byte getRAsByte()
ColorColorgetRAsByte in interface Colorpublic byte getGAsByte()
ColorColorgetGAsByte in interface Colorpublic byte getBAsByte()
ColorColorgetBAsByte in interface Colorpublic byte getAAsByte()
ColorColorgetAAsByte in interface Colorpublic void setR(float r)
Colorpublic void setG(float g)
Colorpublic void setB(float b)
Colorpublic void setA(float a)
Colorpublic float rf()
rf in interface ColorColor.getRAsFloat()public float gf()
gf in interface ColorColor.getGAsFloat()public float bf()
bf in interface ColorColor.getBAsFloat()public float af()
af in interface ColorColor.getAAsFloat()public float rb()
rb in interface ColorColor.getRAsByte()public float gb()
gb in interface ColorColor.getGAsByte()public float bb()
bb in interface ColorColor.getBAsByte()public float ab()
ab in interface ColorColor.getAAsByte()public int argb8888()
Colorpublic int rgba8888()
Colorpublic int rgba4444()
Colorpublic int rgb888()
Colorpublic int rgb565()
Colorpublic int bgr565()
Colorpublic int bgra4444()
Colorpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object