An RGBA color. Each component is a value with a range from 0 to 1. Can be created from an Android ColorInt.
Fields
public float | a | |
public float | b | |
public float | g | |
public float | r |
Public Constructors
Color()
Construct a Color and default it to white (1, 1, 1, 1).
|
|
Color(float r, float g, float b)
Construct a color with the RGB values passed in and an alpha of 1.
|
|
Color(float r, float g, float b, float a)
Construct a color with the RGBA values passed in.
|
|
Color(int argb)
Construct a color with an integer in the sRGB color space packed as an ARGB value.
|
Public Methods
Color |
inverseTonemap()
Returns a new color with Sceneform's tonemapping inversed.
|
void |
set(int argb)
Set to RGBA values from an integer in the sRGB color space packed as an ARGB value.
|
void |
set(float r, float g, float b)
Set to the RGB values passed in and an alpha of 1.
|
void |
set(float r, float g, float b, float a)
Set to the RGBA values passed in.
|
void |
Inherited Methods
Fields
public float a
public float b
public float g
public float r
Public Constructors
public Color ()
Construct a Color and default it to white (1, 1, 1, 1).
public Color (float r, float g, float b)
Construct a color with the RGB values passed in and an alpha of 1.
Parameters
r | |
---|---|
g | |
b |
public Color (float r, float g, float b, float a)
Construct a color with the RGBA values passed in.
Parameters
r | |
---|---|
g | |
b | |
a |
public Color (int argb)
Construct a color with an integer in the sRGB color space packed as an ARGB value. Used for constructing from an Android ColorInt.
Parameters
argb |
---|
Public Methods
public void set (int argb)
Set to RGBA values from an integer in the sRGB color space packed as an ARGB value. Used for setting from an Android ColorInt.
Parameters
argb |
---|
public void set (float r, float g, float b)
Set to the RGB values passed in and an alpha of 1.
Parameters
r | |
---|---|
g | |
b |
public void set (float r, float g, float b, float a)
Set to the RGBA values passed in.
Parameters
r | |
---|---|
g | |
b | |
a |