Uranium
Application Framework
UM.Math.Color.Color Class Reference

An RGBA color value. More...

Public Member Functions

def __init__
 
def r (self)
 
def setR (self, value)
 
def g (self)
 
def setG (self, value)
 
def b (self)
 
def setB (self, value)
 
def a (self)
 
def setA (self, value)
 
def setValues (self, r, g, b, a)
 
def __eq__ (self, other)
 
def __hash__ (self)
 
def __repr__ (self)
 
def toHexString (self, include_alpha=False)
 Returns a 7-character string in "#RRGGBB" format representing the color. More...
 

Static Public Member Functions

def fromARGB (value)
 Returns a new Color constructed from a 32-bit integer in ARGB order. More...
 
def fromHexString (value)
 Returns a new Color constructed from a 7- or 9-character string "#RRGGBB" or "#AARRGGBB" format. More...
 

Detailed Description

An RGBA color value.

This class represents an RGBA color value, in the range of 0.0 to 1.0.

Member Function Documentation

◆ fromARGB()

def UM.Math.Color.Color.fromARGB (   value)
static

Returns a new Color constructed from a 32-bit integer in ARGB order.

Parameters
valueA 32-bit integer representing a color in ARGB order.
Returns
A Color constructed from the components of value.

◆ fromHexString()

def UM.Math.Color.Color.fromHexString (   value)
static

Returns a new Color constructed from a 7- or 9-character string "#RRGGBB" or "#AARRGGBB" format.

Parameters
valueA 7- or 9-character string representing a color in "#RRGGBB" or "#AARRGGBB" format.
Returns
A Color constructed from the components of value.

◆ toHexString()

def UM.Math.Color.Color.toHexString (   self,
  include_alpha = False 
)

Returns a 7-character string in "#RRGGBB" format representing the color.

Parameters
include_alphaWhether to return a 7-character "#RRGGBB" or a 9 character "#AARRGGBB" format.
Returns
A 7- or 9-character string representing a color in "#AARRGGBB" format.

The documentation for this class was generated from the following file: