brighter(alpha: Number);
alpha. Color saturation coefficient. The parameter may have values between between 0 (the most saturated color) and 1 (the least saturated color).
The brighter method changes color saturation.
Executing the example requires that the HTML page contains the ColorCombo component named colCombo (see Example of Creating the ColorCombo Component). Reduce saturation of the color selected in the drop-down list by 50%:
// Get color selected in the drop-down list
var color = colCombo.getColor();
// Reduce color saturation
color = color.brighter(0.5);
// Apply changed color
colCombo.setColor(color);
After executing the example saturation of the color selected in the drop-down list is reduced by 50%:
See also:
Color