Skip to content

ColorSetter ​

<ColorSlider name="c" value="#3451b2"> -- a swatch that opens the colour picker, Wolfram's ColorSlider. The binding _c is RGBColor(r, g, b) with the parts in 0..1, which is what a plot's colour attribute or a template can read.

Demos·packages/components/src/color-setter-box.ts· draws ColorSlider

Props

PropTypeDefaultNotes
namestring""The binding this swatch drives: name="c" fills the wildcard _c.reflects
valuestring"#3451b2"The starting colour, #rrggbb.

As a web component

Plain custom elements, no framework required: import @enumeratio/frontend for the side effect and write <color-setter-box> in any HTML. Attributes are kebab-case and always strings; the props table above names each one's attribute where it differs from its prop.