Rgba

RGBA color representation struct

Constructors

Link copied to clipboard
constructor()
constructor(address: Long)
@RequiresApi(value = 26)
constructor(color: Color)
constructor(red: Number = 0, green: Number = 0, blue: Number = 0, alpha: Number = 0)
constructor(value: Int)

Types

Link copied to clipboard
object Companion

Rgba companion

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Link copied to clipboard
var alpha: Int

The alpha value in 0-255

Link copied to clipboard

Converts this RGBA value to ARGB.

Link copied to clipboard

Converts this RGBA value to BGRA.

Link copied to clipboard
var blue: Int

The blue value in 0-255

Link copied to clipboard
var green: Int

The green value in 0-255

Link copied to clipboard

Compute color luma in ITU-R BT.709 specs.

Link copied to clipboard
var red: Int

The red value in 0-255

Link copied to clipboard
var value: Int

The value that encodes the all of the color's channels. RGBA color space.

Functions

Link copied to clipboard
@RequiresApi(value = 26)
fun asColor(): Color

Converts this Rgba to Color.

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard
external fun isLight(): Boolean

Check if color is light.

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard
external fun swapRedBlue()

Swaps red and blue colors.