You are reading 12.7.0. See this page in 13.4.1.
Titanium.UI.Color
Extends Titanium.Proxy
Represents a color used for UI components.
This type may be used on iOS for assignment to any property typically taking a String color value. A developer is not expected to typically interact with a Titanium.UI.Color object, as we generate them under the hood when converting the passed in String representations. One major exception is use of the Titanium.UI.fetchSemanticColor method, which will return an instance to be passed to UI components. This instance will automatically "adapt" the receiver to light/dark mode changes.
The only current instance you'd receive this type on Android is through the Titanium.UI.Android.getColorResource method. Note that Android does not currently support passing in instances of this type for UI components/properties! You must convert to a hex string representation to pass this in to any color properties on Android.
See UI Element Colors and Standard Colors for lists of named colors to pass to Titanium.UI.fetchSemanticColor on iOS.
See R.color for a list of system color names to use to pass to Titanium.UI.Android.getColorResource on Android.
Properties 3
Inherited from Titanium.Proxy
The name of the API that this proxy corresponds to.
Inherited from Titanium.Proxy
Indicates if the proxy will bubble an event to its parent.
Default: true
Inherited from Titanium.Proxy
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
Methods 5
Inherited from Titanium.Proxy
Adds the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to invoke when the event is fired. 4 fields
|
applyProperties
since 3.0.0Inherited from Titanium.Proxy
Applies the properties to the proxy.
| Parameters | Type | Description |
|---|---|---|
| props | Dictionary | A dictionary of properties to apply. |
Inherited from Titanium.Proxy
Fires a synthesized event to any registered listeners.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| event? | Dictionary | A dictionary of keys and values to add to the Titanium.Event object sent to the listeners. |
Inherited from Titanium.Proxy
Removes the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to remove. Must be the same function passed to 4 fields
|
Returns a hex string representation of the color (in the RRGGBB or AARRGGBB formats)
The returned value is an uppercase hex representation of the color with a leading '#'. If fully opaque,
the alpha hex values will be omitted. For example, black would return '#000000'. Black with a 50% opacity
would return '#80000000'