Color

open class Color

An RGBA color. Each component is a value with a range from 0 to 1. Can be created from an Android ColorInt.

Deprecated

Constructors

Link copied to clipboard
constructor()
Construct a Color and default it to white (1, 1, 1, 1).
constructor(color: Color)
Construct a Color with the values of another color.
constructor(r: Float, g: Float, b: Float)
Construct a color with the RGB values passed in and an alpha of 1.
constructor(r: Float, g: Float, b: Float, a: Float)
Construct a color with the RGBA values passed in.
constructor(@ColorInt argb: Int)
Construct a color with an integer in the sRGB color space packed as an ARGB value.

Properties

Link copied to clipboard
open var a: Float
Link copied to clipboard
open var b: Float
Link copied to clipboard
open var g: Float
Link copied to clipboard
open var r: Float

Functions

Link copied to clipboard
open fun inverseTonemap(): Color
Returns a new color with Sceneform's tonemapping inversed.
Link copied to clipboard
open fun set(color: Color)
Set to the values of another color.
open fun set(@ColorInt argb: Int)
Set to RGBA values from an integer in the sRGB color space packed as an ARGB value.
open fun set(r: Float, g: Float, b: Float)
Set to the RGB values passed in and an alpha of 1.
open fun set(r: Float, g: Float, b: Float, a: Float)
Set to the RGBA values passed in.