Rendyn

Component library

189 components

Product blocks

Color Picker

Color Picker composes a color surface and controls around a value and change callback.

Interactive exampleReact Tailwind CSS

Practical React example

Edit a theme color while keeping the saved color format explicit.

Before you copy and paste

Use the composed primitives together under their required provider, where one is present. Copy components/kibo-ui/color-picker/index.tsx and its returned support files from the Code tab; preserve the project-relative paths. Install the listed primitives: pnpm dlx shadcn@latest add button input select.

Listed package dependencies: color, lucide-react, radix-ui.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Edit a theme color while keeping the saved color format explicit

// Usage adapted from Kibo UI's pinned MIT source.
// Copyright (c) 2023 — Present shadcnblocks. See ./LICENSES.md.
"use client";

import {
  ColorPicker,
  ColorPickerAlpha,
  ColorPickerEyeDropper,
  ColorPickerFormat,
  ColorPickerHue,
  ColorPickerOutput,
  ColorPickerSelection,
} from "@/components/kibo-ui/color-picker";

const Example = () => (
  <ColorPicker className="max-w-sm rounded-md border bg-background p-4 shadow-sm">
    <ColorPickerSelection />
    <div className="flex items-center gap-4">
      <ColorPickerEyeDropper />
      <div className="grid w-full gap-1">
        <ColorPickerHue />
        <ColorPickerAlpha />
      </div>
    </div>
    <div className="flex items-center gap-2">
      <ColorPickerOutput />
      <ColorPickerFormat />
    </div>
  </ColorPicker>
);

export default Example;

Usage example adapted from Kibo UI's pinned MIT source. Retain the source licence notices when copying.

Read the callback’s value shape before saving it; it may differ from the string you initially passed. Normalize colors at the application boundary and update related preview tokens deliberately.

Customization

ColorPickerProps.value
Optional; Parameters<typeof Color>[0].
ColorPickerProps.defaultValue
Optional; Parameters<typeof Color>[0].
ColorPickerProps.onChange
Optional; (value: Parameters<typeof Color.rgb>[0]) => void.

Integration notes

  • Validate persisted color values rather than treating arbitrary CSS as safe input.
  • Provide a keyboard-editable textual color value and verify contrast after a person changes it.

Component source: Kibo UI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP