Class: LM_ColorSwatch

Parent class: LM_BaseWidget

The LM_ColorSwatch class lets the user choose a color. It is filled in with the current color selection, and when the user clicks it, a color picker appears to select a new color. To create a new color swatch, you would use the following function:


LM_ColorSwatch LM.GUI.ColorSwatch(allowAlpha, msg)

Creates a new LM_ColorSwatch object that can then be added to a dialog or toolbar.

Return value (LM_ColorSwatch): ***description allowAlpha (bool): true if the user should be allowed to specify alpha (opacity), false otherwise msg (int): a message value to be triggered when a new color is chosen

Member Functions


void SetValue(color)

Sets the current color value.

Return value: none color (rgb_color): the color to show in the color swatch
rgb_color Value()

Returns the current color selection.

Return value (rgb_color): the current color displayed in the swatch