Skip to content

ew-color-pickerEvent-driven · Plugin-based Color Picker

Small, composable, extensible. The core only owns color state and events — the UI is assembled from plugins.

ew-color-picker

Try it now

A real, running color picker rendered directly from the built artifacts.

Minimal example

One container, one stylesheet, one constructor call.

html
<link rel="stylesheet" href="@ew-color-picker/style/dist/index.css" />
<link rel="stylesheet" href="@ew-color-picker/style/dist/input-number.css" />

<div id="picker"></div>

<script type="module">
  import ewColorPicker from '@ew-color-picker/ew-color-picker'

  const picker = new ewColorPicker({
    el: '#picker',
    defaultColor: '#6366f1',
    predefineColor: ['#6366f1', '#8b5cf6', '#06b6d4', '#22c55e'],
    changeColor(color) {
      console.log('Current color:', color)
    }
  })
</script>