The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientColorEdit.SetColor(value) Method

Specifies the color value for the color editor.

Declaration

SetColor(value: string): void

Parameters

Name Type Description
value string

A string value specifying the editor color.

Remarks

Use the SetColor method to set the editor color on the client side. The method supports the following color formats.

  • HTML color name

    
    myColorEdit.SetColor('red');
    
  • Longhand hexadecimal notation

    
    myColorEdit.SetColor('#FFFF00');
    
  • Shorthand hexadecimal notation

    
    myColorEdit.SetColor('#FF0');
    
  • RGB format

    
    myColorEdit.SetColor('rgb(255,255,0)');
    

To obtain the editor color value on the client side, use the ASPxClientColorEdit.GetColor method.

On the server side, you can specify the color with the ASPxColorEdit.Color or ASPxColorEdit.Value property.

See Also