Search.../

color

Sets or gets the text color of an element.

Description

The text color value is a string representing an rgb color in one of the following formats:

This style can be used with the following elements:

Type:

stringRead & Write

Was this helpful?

Set the text color

Code Example

Copy Code
1$w("#myElement").style.color = "rgb(255,0,0)";
Get the text color

Code Example

Copy Code
1let color = $w("#myElement").style.color;