HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • Meter
  • Multi Select
  • Native Select
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • Sortable
  • Spinner
  • Stat
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
AI
  • Message Scroller
  • Message
  • Bubble
  • Marker
  • Attachment
  • Questionnaire
  • Composer
  • Reasoning
  • Tool Call
  • Approval Card
  • Citations
Blocks
  • Airtable
  • Airtable Kanban
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Utilities
  • motion
  • sounds
  • scroll-fade
  • shimmer
Another UI. Built on shadcn/ui with Phosphor icons.

Color Picker

PreviousNext

Pick a color by area, hue and opacity, type it as HEX, RGB or HSL, grab it from the screen, or choose a preset swatch.

Base UIReact AriaRadix UI
#
#0ea5e9b3

Selected #1d4ed8

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/color-picker.json

Usage#

import {
  ColorPicker,
  ColorPickerPopover,
  ColorSwatches,
} from "@/components/ui/color-picker"
<ColorPickerPopover
  label="Accent"
  value={accent}
  onValueChange={setAccent}
  presets={["#ef4444", "#22c55e", "#3b82f6"]}
/>
 
<ColorPicker value={overlay} onValueChange={setOverlay} alpha />
 
<ColorSwatches colors={brand} value={color} onPick={setColor} />

Parts#

  • ColorPicker. The full picker, inline. The value is a hex string, #rrggbb, or #rrggbbaa when alpha is on.
  • Area. Drag to set saturation and brightness, or focus it and use the arrow keys. Hold Shift for steps of 10.
  • Hue and opacity. Two sliders. Opacity only shows with alpha, over a checkerboard so you can see it.
  • Values. Switch between HEX, RGB and HSL and type a value. It checks the value when you leave the field or press Enter, and shakes if it is out of range.
  • Eyedropper. Picks a color from anywhere on the screen. It only shows in browsers that have one.
  • Copy. Copies the hex value and confirms with a tooltip.
  • ColorPickerPopover. A swatch button that opens the picker in a popover.
  • ColorSwatches. Preset colors on their own, for when the choice is limited to a palette.
CollapsibleCombobox

On This Page

InstallationUsageParts