Class Color
- java.lang.Object
-
- pro.streem.ar.sceneform.rendering.Color
-
public class Color extends java.lang.ObjectAn RGBA color. Each component is a value with a range from 0 to 1. Can be created from an Android ColorInt.
-
-
Constructor Summary
Constructors Constructor Description 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.Color(Color color)Construct a Color with the values of another color.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorinverseTonemap()Returns a new color with Sceneform's tonemapping inversed.voidset(float r, float g, float b)Set to the RGB values passed in and an alpha of 1.voidset(float r, float g, float b, float a)Set to the RGBA values passed in.voidset(int argb)Set to RGBA values from an integer in the sRGB color space packed as an ARGB value.voidset(Color color)Set to the values of another color.
-
-
-
Constructor Detail
-
Color
public Color()
Construct a Color and default it to white (1, 1, 1, 1).
-
Color
public Color(Color color)
Construct a Color with the values of another color.
-
Color
public Color(float r, float g, float b)Construct a color with the RGB values passed in and an alpha of 1.
-
Color
public Color(float r, float g, float b, float a)Construct a color with the RGBA values passed in.
-
Color
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.
-
-
Method Detail
-
set
public void set(Color color)
Set to the values of another color.
-
set
public void set(float r, float g, float b)Set to the RGB values passed in and an alpha of 1.
-
set
public void set(float r, float g, float b, float a)Set to the RGBA values passed in.
-
set
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.
-
inverseTonemap
public Color inverseTonemap()
Returns a new color with Sceneform's tonemapping inversed.
-
-