Home

# Class goog.ui.HsvaPalette

Creates an HSVA palette. Allows a user to select the hue, saturation, value/brightness and alpha/opacity.

extends goog.ui.HsvPalette

Instance Method Summary
| `createDom()` Creates the initial DOM representation for the component. The default implementation is to set this.element_ = div.
| `disposeInternal()` Disposes of the component. Calls {@code exitDocument}, which is expected to remove event handlers and clean up the component. Propagates the call to the component's children, if any. Removes the component's DOM from the document unless it was decorated.
| `getAlpha() ⇒ number` Alpha transparency of the currently selected color, in [0, 1]. For the HSV palette this always returns 1. The HSVA palette overrides this method.
| `getColorRgbaHex() ⇒ string` Gets the color that is currently selected in this color picker, in #rrggbbaa format.
| `handleInput_(?goog.events.Event e)` Handles input events on the hex value input field.
| `handleMouseDown_(?goog.events.BrowserEvent e)` Handles mousedown events on palette UI elements.
| `handleMouseMoveA_(?goog.math.Rect b, ?goog.events.Event e)` Handles mousemove events on the document once a drag operation on the alpha slider has started.
| `setAlpha(number alpha)` Sets which color is selected and update the UI. The passed color should be in #rrggbb format. The alpha value will be set to 1.
| `setColor(string color)` Sets which color is selected and update the UI. The passed color should be in #rrggbb format. The alpha value will be set to 1.
| `setColorAlphaHelper_(string color, number alpha)` Sets which color and alpha value are selected and update the UI. The passed color should be in #rrggbb format.
| `setColorRgbaHex(string color)` Sets which color is selected and update the UI. The passed color should be in #rrggbbaa format. The alpha value will be set to 1.
| `updateInput()` Updates the text entry field.
| `updateUi_()` Updates the position, opacity, and styles for the UI representation of the palette.

Static Method Summary
| `parseColorRgbaHex_(string color) ⇒ ?Array` Parses a #rrggbbaa color string.
| `parseUserInput_(string value) ⇒ ?Array` Parses an #rrggbb or #rrggbbaa color string.