Color.brighten

Syntax

brighten(alpha: Number);

Parameters

alpha. Color saturation coefficient. This parameter may have values in the range between 0 (the least saturated color) and 1 (the most saturated color).

Description

The brighten method changes color saturation.

Example

To execute the example the HTML page must contain the ColorCombo component named colCombo (see Example of Creating the ColorCombo Component). Reduce saturation of the color selected in the drop-down menu by 50%:

// Get the color selected in drop-down menu
var color = colCombo.getColor();
// Increase color saturation
color.brighten(0.5);
// Apply changed color
colCombo.setColor(color);

After executing the example saturation of the color selected in drop-down menu is decreased by 50%:

Color