Color.isEqual

Syntax

isEqual (color)

Parameters

color. The color to which the current color is compared. An instance of the Color class.

Description

The isEqual method compares two colors.

Comments

This method returns True if the colors are equal and False if otherwise.

Example

To execute the example the HTML page must contain two ColorCombo components named colCombo and colCombo1 (seebsp; Example of Creating the ColorCombo Component). Add a handler for the ColorCombo.ColorChanged:

colCombo.ColorChanged.add(function (sender, args) {       
    var col = colCombo.getColor();       
    var col1 = colCombo1.getColor();       
    if (col.isEqual(col1) == false) {           
        colCombo1.setColor(col)       
    }   
});

After executing the example on changing color in the colCombo component, the same color is set for the colCombo1 component.

Color