Java com.badlogic.gdx.graphics Color fields, constructors, methods, implement or subclass

Example usage for Java com.badlogic.gdx.graphics Color fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.badlogic.gdx.graphics Color.

The text is from its open source code.

Subclass

com.badlogic.gdx.graphics.Color has subclasses.
Click this link to see all its subclasses.

Field

ColorCLEAR
ColorWHITE
ColorBLACK
ColorRED
ColorGREEN
ColorBLUE
ColorLIGHT_GRAY
ColorGRAY
ColorDARK_GRAY
ColorPINK
ColorORANGE
ColorYELLOW
ColorMAGENTA
ColorCYAN
ColorOLIVE
ColorPURPLE
ColorMAROON
ColorTEAL
ColorNAVY
Colortmp

Constructor

Color(float r, float g, float b, float a)
Constructor, sets the components of the color
Color(int rgba8888)
Color(Color color)
Constructs a new color using the given color
Color()
Constructs a new Color with all components set to 0.

Method

Coloradd(Color color)
Adds the given color to this color.
Coloradd(float r, float g, float b, float a)
Adds the given color component values to this Color's values.
intargb8888(Color color)
voidargb8888ToColor(Color color, int value)
Sets the Color components using the specified integer value in the format ARGB8888.
Colorclamp()
Clamps this Color's components to a valid range [0 - 1]
Colorcpy()
booleanequals(Object o)
Colorlerp(final Color target, final float t)
Linearly interpolates between this color and the target color by t which is in the range [0,1].
Colormul(Color color)
Multiplies the this color and the given color
Colormul(float value)
Multiplies all components of this Color with the given value.
Colormul(float r, float g, float b, float a)
Multiplies this Color's color components by the given ones.
intrgba8888(float r, float g, float b, float a)
intrgba8888(Color color)
voidrgba8888ToColor(Color color, int value)
Sets the Color components using the specified integer value in the format RGBA8888.
Colorset(float r, float g, float b, float a)
Sets this Color's component values.
Colorset(Color color)
Sets this color to the given color.
Colorset(int rgba)
Sets this color's component values through an integer representation.
Colorsub(Color color)
Subtracts the given color from this color
Colorsub(float r, float g, float b, float a)
Subtracts the given values from this Color's component values.
floattoFloatBits()
Packs the color components into a 32-bit integer with the format ABGR and then converts it to a float.
floattoFloatBits(int r, int g, int b, int a)
Packs the color components into a 32-bit integer with the format ABGR and then converts it to a float.
floattoFloatBits(float r, float g, float b, float a)
Packs the color components into a 32-bit integer with the format ABGR and then converts it to a float.
inttoIntBits()
Packs the color components into a 32-bit integer with the format ABGR.
StringtoString()
Returns the color encoded as hex string with the format RRGGBBAA.
ColorvalueOf(String hex)
Returns a new color from a hex string with the format RRGGBBAA.