Create Custom Color Dialog

This dialog, which can be invoked in a number of contexts, allows you to define a custom color for use in the rich text editor.

On the dialog’s invocation, if the current context has a color applied, the controls within the dialog reflect the same.

The dialog contains the following:

      Color chart: the chart displays colors relevant to the hue selected at the right hand vertical slider and context of invocation.  You can click on the chart to select the color value at the point in question.

      Vertical slider: the vertical slider, shown to the right of the color chart, facilitates selection of the range of colors to be displayed in the chart.

The following properties are shown below the color chart:

      Initial color

      Selected color

      Previous color

Note that you can select a color using these properties, by clicking one.

      Color model type: this dropdown exposes how colors are to be modeled in the dialog.  The following values are available:

CMYK

HLS

HSV

RGB (the default)

      Color model units: the properties shown below the dropdown are contingent upon the value selected therein.  Each is accompanied by a horizontal slider that facilitates its setting (and adjusts properties elsewhere in the dialog accordingly - moving a slider results in corresponding movement at the vertical slider and change in # value.

      A: ‘Alpha’ – this property controls the selected color’s opacity.

      #: this property allows you to specify a color hex value.

Two buttons are displayed at the bottom of the dialog:

      OK: clicking this button applies the selected color to the context of the dialog’s invocation.

      Cancel: clicking this button closes the dialog without applying the selected color.  Note that clicking off the dialog has the same effect.