Skip to content
cosmodev ~/tools/palette-from-image

이미지 팔레트 추출

Images & Media

이미지에서 지배적인 색상을 재사용 가능한 팔레트로 추출해요 — 중간 분할 양자화와 점유 비율, hex와 rgb, 복사 가능 — 전부 브라우저에서 동작해요.

이미지를 선택하면 팔레트를 추출해요.

(문서는 영어)

Palette from Image

What it does

Extracts the dominant colors of any image as a working palette: 4, 8, 12 or 16 swatches, each with its hex and rgb value and the share of the image it covers. The quantization is median-cut — the image is down-sampled, split repeatedly along its widest color channel, and each bucket averages into one swatch — implemented from scratch, with the same logic available as a Go CLI twin.

Runs locally; the image never uploads.

How to use

  1. Drop an image (photos, screenshots, logos, artwork all work).
  2. Pick the swatch count.
  3. Copy individual hex values or the whole palette as a list.

Examples

A brand hero photo typically yields 4-6 saturated swatches plus neutrals — the darker half of the list often forms a ready text/background pair.

A logo with flat colors returns exactly those colors, with population shares reflecting their coverage.

Good to know

  • Down-sampling to ≤96 px keeps results stable for huge photos.
  • Population share is measured over sampled pixels, not exact pixel counts.
  • The swatches pair well with the Color Picker and Contrast tools for building a compliant palette.
소스 코드14개 언어

100% 클라이언트 측 · 데이터는 브라우저 밖으로 나가지 않습니다. 도움이 되었나요? 팀원에게 공유해 보세요.