ColorBox

A widget used to specify a color value.

Included in: dx.webappjs.js, dx.all.js

The dxColorBox widget allows a user to either specify a color value manually or pick it out from the drop-down editor.

You can create a widget using one of the following approaches.

  • jQuery
    Use the dxColorBox jQuery plug-in.

    HTML
    <div id="colorBox"></div>
    JavaScript
    $("#colorBox").dxColorBox({
        value: 'rgba(255, 144, 0, 0.3)',
        editAlphaChannel: true
    });
  • Knockout
    Add a div element and apply the dxColorBox binding to this element.

    HTML
    <div data-bind="dxColorBox: {
        value: 'rgba(255, 144, 0, 0.3)',
        editAlphaChannel: true
    }"></div>
  • Angular
    Add a div element and apply the dx-color-box directive to this element.

    HTML
    <div dx-color-box="{
        value: 'rgba(255, 144, 0, 0.3)',
        editAlphaChannel: true
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or Angular approach, the Knockout or Angular library is also required.

See Also

You can find detailed information on the principles of working with the widget in the dxColorBox section of the Editor Widgets article.

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the dxColorBox widget.

Methods

This section describes members used to manipulate the widget.

Events

This section describes events exposed by this widget.