The DIALOG_COLORGRADIENT function allows you to interactively define a color table as a gradient interpolated between a series of user-defined colors.

Examples


Open the Define Color Gradient dialog:

result = DIALOG_COLORGRADIENT()

For a detailed description of how to use this dialog, see Using the CW_COLORGRADIENT Widget.

Syntax


Result = DIALOG_COLORGRADIENT( [, CALLBACK_ROUTINE=string] [, DIALOG_PARENT=widget_id] [, GRADIENT_DEFINITION=variable] [, TITLE=string] )

Return Value


DIALOG_COLORGRADIENT returns a structure with two fields:

  • COLOR_TABLE: An array of 256 x 3 elements containing the color table values defined in the dialog.
  • DEFINITION: A hash containing all of the information needed to re-create the gradient. You can initialize subsequent calls to DIALOG_COLORGRADIENT using the GRADIENT_DEFINITION keyword with this definition.

Keywords


CALLBACK_ROUTINE

Set this keyword to a string representing the name of an IDL procedure to be called each time the gradient changes.

DIALOG_PARENT

Set this keyword to the widget ID of a widget to be used as the parent of this dialog.

GRADIENT_DEFINITION

Set this keyword to a hash to set the value of the initial gradient display by the Define Color Gradient dialog. See the DEFINITION field description in the Return Value section above.

TITLE

Set this keyword to a string with the title of the Define Color Gradient dialog.

Version History


8.7.1

Introduced

See Also


CW_COLORGRADIENT