Color (hwx.inspire.Attributes)#

class Color(default=(0, 0, 0), **kwds)#

Bases: Triple

Stores a color value as 3 RGB float values between 0 to 1

The color can also be set by name like:

obj.color = “blue”

Attribute Table#

Name

Type

components

NoneType

Method Table#

Name

Description

castForSet (self, obj, value)

Converts and validates the value of the attribute before setting.

getGuiValue (self, obj)

castForSet(obj, value)#

Converts and validates the value of the attribute before setting.

Converts the value it to its internal type (and base units if applicable).

Parameters:
  • obj (GeneralObject) – Object this attribute belongs to.

  • value (Any) – Value of the attribute to set.

Returns:

Validated and converted value.

Return type:

value (Any)

getGuiValue(obj)#

Returns the formatted value, as shown in the Property Editor.

Value#

alias of Value