Color Converter

Paste any CSS color and get every format at once: HEX, RGB(A), HSL(A), HWB, LAB, LCH, OKLAB, OKLCH, and color(). Alpha and gamut-aware. Converted in your browser — never sent.

Loading…
Color Converter
Paste HEX, RGB(A), HSL(A), HWB, LAB, LCH, OKLAB, OKLCH, CSS color(), or a named CSS color and get every other format at once. Alpha and gamut-aware, with a shareable URL.

Developer notes

• colorjs.io is the sole parser/converter — no chroma-js, tinycolor2, or culori. • Alpha multiplies the pasted color's own alpha, so a pasted rgba(...) keeps its alpha at the default alphaValue=1. • HWB and the LAB/LCH/OKLAB/OKLCH/color() block never carry an alpha suffix — only rgba, hsla, hex8, and color() reflect alphaValue. • Out-of-gamut colors use the CSS Color 4 gamut-mapping algorithm when gamutFallback is on; off shows a naive per-channel clip. • Precision rounds LAB/LCH/OKLAB/OKLCH/color() channels only — HEX/RGB/HSL are fixed by definition.

Options

  • AlphaMultiplies the pasted color's own alpha. Recomputes rgba, hsla, hex8, and color() alpha; hex6 and plain HSL stay unaffected. Default 1 (preserves the pasted alpha).
  • Modern formatsShows or hides the LAB / LCH / OKLAB / OKLCH / color() block. HEX/RGB(A)/HSL(A)/HWB always stay visible. Default on.
  • Gamut fallbackShows a visible badge and a gamut-mapped sRGB value for wide-gamut input. Off shows only the raw, possibly clipped values. Default on.
  • PrecisionDecimal places shown on LAB/LCH/OKLAB/OKLCH/color() numeric channels. Does not apply to HEX (fixed digits) or RGB/HSL (integers/percentages). Default 2.

Related CSS tools

Hub: Color & CSS Tools. Check contrast with Color Contrast Checker, or shrink and format stylesheets with Minify CSS and Beautify CSS.

Color Converter FAQ

Paste-local universal color converter

What color formats can I paste?

HEX, RGB(A), HSL(A), HWB, LAB, LCH, OKLAB, OKLCH, CSS color() (including display-p3), and named CSS colors — no format picker needed.

Are my colors uploaded anywhere?

No. Parsing and conversion run entirely in your browser via colorjs.io. FastMinify never sends colors to a server.

What happens to out-of-gamut colors?

A badge appears, and with gamutFallback on, the baseline HEX/RGB/HSL rows show a CSS Color 4 gamut-mapped sRGB value, labeled distinct from the raw wide-gamut value in the modern block.

Does alpha apply to every format?

Alpha reflects in rgba, hsla, hex8, and color(). HWB and the LAB/LCH/OKLAB/OKLCH channels stay alpha-free.

Color & CSS Tools

Paste-local WCAG contrast checking with modern CSS color syntax — pair and matrix views, never uploaded.

Explore other tool categories

Minify

Shrink code and assets for production — minify JavaScript, CSS, HTML, JSON and XML before gzip or CDN deploy.

Unminify

Expand minified or compressed code — unminify JavaScript, CSS, TypeScript, SCSS, LESS, SQL, YAML and other formats when debugging or reviewing.

Conversion

Transform data between JSON, YAML, XML and CSV locally — no server uploads.

Encoding

Encode or decode Base64, URL components and HTML entities — client-side only.

Serialization

Serialize and deserialize PHP data structures beside JSON workflows.

JSON Tools

Validate, format, diff and explore JSON payloads — complementary to minifiers and converters.

SVG Tools

Preview, optimize with SVGO, export Data URI, resize, beautify, convert to JSX and validate SVG — all in your browser.

Beautify

Make code readable with consistent indentation — beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.

CSS preprocessors

Compile SCSS or LESS to standard CSS in the browser — pair with beautify or minify for a full stylesheet workflow.

DevOps & Infra

Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.

CI/CD

GitHub Actions and GitLab CI — format YAML and check workflow/job structure in your browser.

Logs & observability

Line-oriented JSON/NDJSON and Nginx/Apache access logs — format, filter, validate, and CSV/TSV.

Kubernetes

Multi-doc manifests, structural validate, Ingress/Deployment starters, and Helm values formatting.

Networking / IP

CIDR, subnets, and IPv4/IPv6 helpers — in your browser.

Security & tokens

JWKS, X.509 certificates, and secrets scan — browser-local.

API & schemas

OpenAPI tools to format, validate, and lint your specs.

HTTP Tools

Paste-local cURL, HTTP messages, URLs, HAR files, and Cookie / Set-Cookie headers — format and inspect in your browser, never sent.

Developer utilities

Timestamps, UUID, ULID, Nanoid, cron, passwords, regex, slugify, number bases, case, text diff, and chmod — all client-side.

Text & Markdown

Count words, build Markdown TOCs, and clean line lists — all in your browser.

AI & LLM

Token counting, pricing estimates, and context-window fit — 100% browser-local.

Test Data

Synthetic field values for fixtures and DB seed — reserved-range phone numbers first.