Palette Sorter
Paste hex, rgb, hsl, oklch or named colors and sort them by hue, lightness, saturation or chroma. Perceptual ordering, fully in-browser.
Sorted swatches
0 colors · 0 near-duplicatesPaste a palette to get started
Hex, rgb(), hsl(), oklch() and CSS names are accepted.
Sorted output
original · 0 charsExamples
Typical use
palette-sorter inputscomputed resultPreview and copied output use the same computation.
Edge case
invalid or extreme inputclear inline error or clamped resultFailures are visible rather than silently swallowed.
About this tool
Paste a list of colors and reorder it by hue, lightness, saturation or chroma using OKLCH. The tool preserves original tokens and never generates new colors.
Hue path sorting is paste-order independent; grays are grouped separately and alpha is respected in duplicate checks.
What this tool does not do
- Hue path sorting is paste-order independent; grays are grouped separately and alpha is respected in duplicate checks.
How to use this tool
Step 1
Paste colors as lines, comma lists, JSON arrays or CSS declarations
Step 2
Pick a sort key and direction; wrap-aware hue path rotates at the largest gap
Step 3
Inspect the swatch rail and near-duplicate chips
Step 4
Copy or download as tokens, hex, CSS variables, JSON or OKLCH
Use cases
Everyday workflow
Paste a list of colors and reorder it by hue, lightness, saturation or chroma using OKLCH. The tool preserves
Common mistakes
Mistake:Ignoring the stated assumptions.
Fix:Read the notes in the output panel before applying the result.
Frequently asked questions
How does hue sorting handle the wrap?
Wrap-aware mode sorts hues then rotates at the largest circular gap, so reds stay together regardless of paste order.
Which color space is used?
OKLCH, a perceptually uniform space; near-duplicates use OKLab deltaE.
What input formats are accepted?
Hex, rgb, hsl, oklch, CSS names, comma lists, JSON arrays and declaration lines.
References & standards
Related tools
CIELAB Color Explorer
Convert colors to CIELAB/LCh and XYZ, explore a*–b* and L*–C* slices, and compare colors with ΔE76 and ΔE2000.
CMYK Color Converter
Convert hex/RGB to CMYK percentages and back with total ink limits, rich-black recipes, batch conversion and a print preview.
Color Blindness Simulator
Simulate color blindness on palettes and images. Compare protanopia, deuteranopia, tritanopia, and more side-by-side.
Color Contrast Checker
Advanced WCAG accessibility compliance checker with color blindness simulation, multiple text sizes, and comprehensive analysis features.
Color Converter
Convert colors between multiple formats (HEX, RGB, HSL, HSV, CMYK, LAB) with color blindness simulation, named colors, and batch processing
Color Extractor
Extract colors from uploaded images by hovering over pixels to get precise color values.