# Channel sliders

> Red, green, blue and opacity sliders with numeric fields, each track redrawn from the others.

A shadcn/ui block from the [@reui](https://reui.io) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/reui/c-color-picker-11).

- Page, with a live preview: https://shadcn.exchange/r/reui/c-color-picker-11
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-color-picker-11-light-c373bcddbce8a356.png
- Registry item: https://reui.io/r/new-york-v4/c-color-picker-11.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-color-picker-11.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `card`, `@reui/color-picker`, `input-group`

## Files

### `c-color-picker-11.tsx`

```tsx
"use client"

import { useState } from "react"
import {
  ColorPicker,
  ColorPickerChannelInput,
  ColorPickerSlider,
  ColorPickerSwatch,
  ColorPickerValue,
} from "@/components/reui/color-picker"

import { Card, CardContent } from "@/components/ui/card"
import { InputGroup } from "@/components/ui/input-group"

const CHANNELS = [
  { channel: "red", short: "R" },
  { channel: "green", short: "G" },
  { channel: "blue", short: "B" },
  { channel: "alpha", short: "A" },
] as const

export function Pattern() {
  const [value, setValue] = useState<string | null>("rgb(244 63 94 / 0.85)")

  return (
    <Card className="w-full max-w-sm">
      <CardContent>
        <div className="flex flex-col gap-5">
          <ColorPicker
            value={value}
            onValueChange={setValue}
            alpha
            format="rgb"
            aria-label="Mixed color"
          >
            <div className="flex items-center gap-3">
              <ColorPickerSwatch shape="circle" className="size-10" />
              <div className="flex min-w-0 flex-col">
                <span className="text-sm font-medium">Channel mixer</span>
                <span className="text-muted-foreground font-mono text-xs">
                  <ColorPickerValue />
                </span>
              </div>
            </div>
            {/* Each track shows the range its channel can reach from here:
                dragging red redraws the green and blue tracks with it. */}
            <div className="grid gap-3">
              {CHANNELS.map(({ channel, short }) => (
                <div
                  key={channel}
                  className="grid grid-cols-[1rem_1fr_4rem] items-center gap-3"
                >
                  <span
                    aria-hidden="true"
                    className="text-muted-foreground text-xs font-medium"
                  >
                    {short}
                  </span>
                  <ColorPickerSlider channel={channel} />
                  <InputGroup>
                    <ColorPickerChannelInput channel={channel} />
                  </InputGroup>
                </div>
              ))}
            </div>
          </ColorPicker>
        </div>
      </CardContent>
    </Card>
  )
}
```
