Skip to content
Huey
GitHub

Color Dropper

An eyedropper tool for picking colors from the screen.

import { ColorDropper } from '@hueycolor/vue'
<script setup>
import { ref } from 'vue'
import { HueyRoot, ColorDropper, hueyColor } from '@hueycolor/vue'
const color = ref(hueyColor('#1A3263'))
</script>
<template>
<HueyRoot v-model="color">
<ColorDropper>
Pick a color
</ColorDropper>
</HueyRoot>
</template>

Extends all standard HTML button attributes. Renders a <slot> for custom content.

Event Payload Description
error Error Emitted when the EyeDropper API fails or the user cancels.

The EyeDropper API is required for this component to work. The component only renders if the browser supports it. Check browser compatibility.