Color Palette
Color swatch display with name, hex/hsl/rgb values, and click-to-copy for design system documentation.
lucide-react
Loading...
Installation
$ shadcn add @jalco/color-paletteUsage
import { ColorPalette } from "@/components/color-palette"<ColorPalette colors={[{ name: "Primary", value: "#6366f1" }]} />Client component. Click any swatch to copy its color value to the clipboard. Supports hex, rgb(), hsl(), oklch(), and named CSS colors.
Examples
Grid
Responsive grid of swatches with name and value labels.
Loading...
Scale strip
Horizontal strip showing a single hue across its full range — ideal for Tailwind-style color scales.
Loading...
API Reference
ColorPalette
PropType
Notes
- Click to copy. Click any swatch to copy its color value to the clipboard.
- Adaptive contrast. Copy icons switch between light and dark based on the swatch background.
- Any CSS color. Supports hex, rgb(), hsl(), oklch(), and named CSS colors.
- Icon library. Uses Lucide icons by default.