stakritools
Developer
  • Base64 Encoder/Decoder
  • Color Picker & Converter
  • CSS Minifier
  • CSV to JSON Converter
  • Hash Generator
  • HTML Minifier
  • JS Minifier
  • JSON Formatter & Validator
  • JSON to CSV Converter
  • JWT Decoder
  • Markdown Editor
  • Password Generator
  • Regex Tester
  • SQL Formatter
  • Unix Timestamp Converter
  • URL Encoder/Decoder
  • UUID Generator
  • XML Formatter
  • YAML Formatter
View all
Image
  • Favicon Generator
  • Image Compressor
  • Image Cropper
  • Image Flipper
  • Image Resizer
  • Image Rotator
  • Image to Base64
  • JPG to PNG Converter
  • PNG to JPG Converter
  • QR Code Generator
  • SVG to PNG Converter
  • Watermark Image
  • WebP Converter
View all
SEO
  • FAQ Schema Generator
  • Meta Description Generator
  • Open Graph Generator
  • Robots.txt Generator
  • SEO Site Auditor
  • SERP Preview
  • Slug Generator
  • Twitter Card Generator
View all
Text
  • Case Converter
  • Find and Replace
  • Lorem Ipsum Generator
  • Random Text Generator
  • Remove Duplicate Lines
  • Remove Extra Spaces
  • Text Diff Checker
  • Word Counter
View all
Calculator
  • Age Calculator
  • BMI Calculator
  • Compound Interest Calculator
  • Date Difference Calculator
  • Discount Calculator
  • EMI Calculator
  • GST Calculator
  • Income Tax Calculator
  • Loan Calculator
  • Percentage Calculator
  • SIP Calculator
  • Tip Calculator
  • Unit Converter
View all
Blog
stakritools

205+ free, browser-based tools for developers, marketers, and creators — no sign-up, no clutter.

Developer Tools

  • Base64 Encoder/Decoder
  • Color Picker & Converter
  • CSS Minifier
  • CSV to JSON Converter
  • Hash Generator
  • HTML Minifier
  • JS Minifier
  • JSON Formatter & Validator
  • JSON to CSV Converter
  • JWT Decoder
  • Markdown Editor
  • Password Generator
  • Regex Tester
  • SQL Formatter
  • Unix Timestamp Converter
  • URL Encoder/Decoder
  • UUID Generator
  • XML Formatter
  • YAML Formatter

Image Tools

  • Favicon Generator
  • Image Compressor
  • Image Cropper
  • Image Flipper
  • Image Resizer
  • Image Rotator
  • Image to Base64
  • JPG to PNG Converter
  • PNG to JPG Converter
  • QR Code Generator
  • SVG to PNG Converter
  • Watermark Image
  • WebP Converter

SEO Tools

  • FAQ Schema Generator
  • Meta Description Generator
  • Open Graph Generator
  • Robots.txt Generator
  • SEO Site Auditor
  • SERP Preview
  • Slug Generator
  • Twitter Card Generator

Text Tools

  • Case Converter
  • Find and Replace
  • Lorem Ipsum Generator
  • Random Text Generator
  • Remove Duplicate Lines
  • Remove Extra Spaces
  • Text Diff Checker
  • Word Counter

Calculator Tools

  • Age Calculator
  • BMI Calculator
  • Compound Interest Calculator
  • Date Difference Calculator
  • Discount Calculator
  • EMI Calculator
  • GST Calculator
  • Income Tax Calculator
  • Loan Calculator
  • Percentage Calculator
  • SIP Calculator
  • Tip Calculator
  • Unit Converter

Company

  • Blog
  • About
  • Privacy Policy
  • Contact
© 2026 stakritools. All rights reserved.
  1. Home
  2. Developer
  3. Color Picker & Converter
Developer

Color Picker & Converter

Pick a color visually or type a value, then instantly convert between HEX, RGB, HSL, HSV, and CMYK. Generate a 5-shade palette and check WCAG contrast ratios — all in your browser.

Try:
HEX#6366f1
RGBrgb(99, 102, 241)
HSLhsl(239, 84%, 67%)
HSVhsv(239, 59%, 95%)
CMYKcmyk(59%, 58%, 0%, 5%)

Palette (5 shades)

Contrast Ratio Checker (WCAG)

Foreground (your color above)#6366f1
Sample text
Contrast ratio: 4.47:1
AA Normal FailAA Large PassAAA Normal FailAAA Large Fail

How To Use

  1. 1.Use the visual color swatch to pick a color, or type a HEX value directly into the input field — every format below updates live as you change either one.
  2. 2.Read off the converted value in RGB, HSL, HSV, or CMYK format, and click the copy icon next to any format to copy that exact string to your clipboard.
  3. 3.Scroll down to the generated palette to see five shades of your chosen color, from darker to lighter — click any swatch to copy its HEX value.
  4. 4.Open the contrast checker, pick a foreground and background color, and read the resulting contrast ratio along with pass/fail badges for WCAG AA and AAA at both normal and large text sizes.
  5. 5.Load one of the Try examples to jump straight to a common brand-style color and see all formats and the palette populate instantly.
  6. 6.Download a text file with every format and the generated palette, or share a link to this tool once you're done.

Examples

Indigo
A vivid blue-violet, popular as a primary brand and UI accent color.
Coral
A warm, saturated red-orange often used for calls to action.
Emerald
A balanced green commonly used for success states and confirmations.
Slate
A muted blue-gray, useful for testing contrast against light and dark backgrounds.

About Color Picker & Converter

Understanding Color Models

A color model is simply a system for describing color as a set of numbers, and different models exist because different tasks call for different ways of thinking about color. RGB and HEX describe color the way a screen physically produces it — as mixed intensities of red, green, and blue light — which makes them the natural choice for anything rendered on a display, but they're not especially intuitive for a human trying to reason about 'a slightly darker version of this blue.' HSL and HSV instead organize color around hue (the position on a color wheel), saturation (how vivid versus muted), and lightness or value (how light versus dark), which maps much more closely to how people naturally describe and adjust color, and is why most color pickers in design software expose HSL or HSV sliders even though the underlying file format ultimately stores RGB or HEX.

CMYK exists for an entirely different physical reason: printers don't emit light, they deposit ink on paper and rely on the paper reflecting ambient light back to your eye, which is a subtractive rather than additive process. Converting between CMYK and the screen-based models is therefore always an approximation rather than a perfect translation, since a printer's actual achievable color range (its 'gamut') differs from a screen's, and specific ink and paper combinations vary the result further.

How Each Conversion Works

Converting HEX to RGB is the simplest step — a HEX string is just RGB written in base-16 instead of base-10, so splitting the six-digit string into three two-digit pairs and parsing each as hexadecimal gives you the red, green, and blue channel values directly. Converting RGB to HSL and HSV both start by normalizing red, green, and blue to a 0–1 range and finding the maximum and minimum channel values; the difference between them (the 'chroma') drives both the saturation calculation and a piecewise formula for hue based on which channel was largest. HSL and HSV diverge specifically in how they compute the third component from that same max/min data — HSL averages the max and min for lightness, while HSV uses the max value alone — which is the precise mathematical reason the two models produce different numbers for what looks like the same perceived brightness.

Converting RGB to CMYK works backward from the additive model: it first computes how much black ('key') is needed based on whichever channel has the least light, then calculates how much cyan, magenta, and yellow ink would need to be removed from that black-adjusted baseline to reproduce each remaining channel. This tool implements every one of these formulas as pure, well-tested JavaScript functions that run synchronously in your browser the instant you change any input.

Building a Color Palette from One Base Color

A common design task is turning a single brand color into a usable range of shades — lighter variants for hover states, subtle backgrounds, or disabled states, and darker variants for text, borders, or pressed states. The technique this tool uses (converting to HSL, then holding hue and saturation constant while shifting only lightness) is exactly how most modern design systems generate their numbered color scales, because it guarantees every shade in the family is visually recognizable as 'the same color, just lighter or darker' rather than drifting toward an unrelated hue as it changes brightness — a common pitfall of naively lightening or darkening in RGB space, which can shift perceived hue in ways that look inconsistent.

Once you have a shade ramp, the next step is almost always pairing specific shades together for actual UI use — a dark shade for body text on a light background, a light shade for a background behind dark text, and so on — which is exactly what the built-in contrast checker is for: confirming that whichever pairing you land on is not just aesthetically pleasing but also genuinely readable.

Designing for Accessible Contrast

Color contrast accessibility isn't just a legal or compliance checkbox — it directly determines whether a meaningful fraction of your actual users can read your content at all. Low vision affects a large share of the population to varying degrees, color blindness affects roughly 1 in 12 men and 1 in 200 women, and even users with typical vision routinely struggle to read low-contrast text on a phone screen in direct sunlight or on a poorly calibrated monitor. The WCAG contrast ratio formula this tool implements is a well-established, objective standard precisely because it doesn't rely on subjective judgment ('does this look readable to me?') — it's a specific mathematical relationship between the relative luminance of two colors that produces the same numeric answer regardless of who's checking.

In practice, the most robust way to design accessible UI is to check contrast early and often as you pick colors, rather than retrofitting it after a design is finalized — swapping a background or text color late in a project tends to cascade into far more rework than starting with an accessible pairing from the outset. Aim for AA at minimum across all body text, and treat AAA as a stretch goal for especially high-stakes content like legal disclosures or critical form errors where maximum legibility genuinely matters most.

FAQs

No. Every conversion — HEX to RGB, RGB to HSL, HSL to HSV, RGB to CMYK, palette generation, and the WCAG contrast calculation — runs entirely inside your browser using plain JavaScript math, with no server-side component involved at any point. There's nothing sensitive about a color value, but this also means the tool works instantly with zero network latency and continues functioning even if your connection drops after the page loads.

HEX and RGB both describe a color as a mix of red, green, and blue light — HEX is just RGB written as a six-digit hexadecimal string (like #6366f1) instead of three separate 0–255 numbers, and the two are always perfectly interchangeable. HSL (Hue, Saturation, Lightness) and HSV (Hue, Saturation, Value — also called HSB for Brightness) describe the same color space differently, organized around how humans intuitively think about color: which hue on the color wheel, how vivid or muted it is, and how light or dark it is. HSL and HSV differ subtly in how they define the third component — HSL's lightness runs from black through the pure hue to white, while HSV's value runs from black up to the pure hue and stays there, which makes HSV a closer match to how many painting and design tools model 'brightness'. CMYK (Cyan, Magenta, Yellow, Key/black) is fundamentally different from the other four — it's a subtractive model describing how much ink to lay down on white paper for print, rather than an additive model describing light emitted from a screen, which is why CMYK is used for print design while HEX, RGB, HSL, and HSV are used for screens.

Screens create color by emitting red, green, and blue light directly (an additive model, which is what RGB, HEX, HSL, and HSV all describe), while printers create color by layering cyan, magenta, yellow, and black ink on white paper and relying on the paper reflecting light back to your eye through those ink layers (a subtractive model, described by CMYK). Beyond the fundamental model difference, printers, inks, and paper stocks all vary in exactly which colors they can physically reproduce — this is why the CMYK conversion shown here is a standard mathematical approximation, useful for getting in the right neighborhood, but professional print work typically requires a properly calibrated, device-specific color profile (an ICC profile) for a truly accurate preview of final printed output.

The palette takes your chosen color, converts it to HSL, and generates five variants by shifting only the lightness value — two darker (roughly -40% and -20% lightness), the original base color unchanged, and two lighter (+20% and +40% lightness) — while keeping the hue and saturation constant throughout. Keeping hue and saturation fixed and only varying lightness is what makes the five shades read as a cohesive family belonging to the same color, which is exactly the technique used to build a typical design-system color scale (like Tailwind's 50–900 shade ramps) from a single brand color.

The Web Content Accessibility Guidelines (WCAG) define a mathematical formula for measuring how much a foreground color (usually text) stands out against a background color, expressed as a ratio from 1:1 (identical colors, completely unreadable) up to 21:1 (pure black on pure white, maximum possible contrast). This ratio matters because low-contrast text is genuinely difficult or impossible to read for users with low vision, color blindness, or even just anyone viewing a screen in bright sunlight — sufficient contrast is one of the most impactful, easy-to-verify accessibility requirements a website or app can meet, and it's a legal requirement in many jurisdictions for public-facing digital products.

AA and AAA are two conformance levels defined by WCAG, with AAA being the stricter standard — AA is the widely-adopted baseline most organizations target and is referenced by most accessibility laws, while AAA is a higher bar recommended for especially critical content but not always achievable across an entire design system. 'Normal text' and 'large text' get different minimum thresholds because larger text is inherently easier to read at lower contrast: normal text needs a 4.5:1 ratio for AA and 7:1 for AAA, while large text (defined as 18pt/24px regular weight or 14pt/18.66px bold, roughly) only needs 3:1 for AA and 4.5:1 for AAA. This tool checks your chosen foreground/background pair against all four thresholds at once and shows a clear pass or fail badge for each.

The most reliable fix is to increase the lightness difference between your foreground and background colors — pushing text darker, the background lighter (or vice versa for dark mode), since contrast ratio is fundamentally driven by the luminance gap between the two colors rather than their hue. Changing hue alone rarely helps much, since two very different hues (like a mid-tone blue and a mid-tone orange) can still have nearly identical luminance and therefore poor contrast; try adjusting the lightness/value component specifically and re-checking the ratio, or step through the generated shade palette above to find a variant of your color with the lightness you need.

Yes — pick your brand's primary color, use the 5-shade palette as a starting point for a lightness-based scale, and run each shade you plan to use for text through the contrast checker against your typical background colors to confirm accessibility before locking in the final palette. Many production design systems extend this same idea to 9 or 10 steps rather than 5, but the underlying technique — fixing hue and saturation while stepping lightness — is exactly what this tool demonstrates at a smaller, more digestible scale.

Converting between color spaces involves floating-point math (trigonometric-style hue calculations, ratios, percentages), and RGB channels are ultimately whole numbers from 0–255, so a round-trip conversion — say, RGB to HSL and back to RGB — can occasionally shift a channel value by 1 due to standard floating-point rounding, even though the visual difference is imperceptible. This is a normal, expected characteristic of color space math generally, not specific to this tool, and it's part of why professional color tools always round consistently and document their rounding behavior rather than claiming perfect lossless round-tripping across fundamentally different color models.

This tool focuses on fully opaque colors across HEX, RGB, HSL, HSV, and CMYK, since CMYK in particular has no standard alpha concept (it describes ink coverage on physical paper, where transparency isn't meaningful the way it is on a screen). If you need an 8-digit HEX (#RRGGBBAA) or an rgba()/hsla() value with a specific alpha channel, you can take any of the opaque values generated here and append your desired alpha component manually — the RGB and HSL numbers themselves remain identical regardless of the alpha value you add on top.

Related Tools

Color Picker & Converter handles color format conversion, palette generation, and contrast checking. These related developer tools cover other common parts of a design and development workflow.

CSS Minifier
DeveloperMinify the stylesheet where your chosen colors end up as CSS custom properties.
JSON Formatter & Validator
DeveloperFormat a design token JSON file containing your generated color palette.
Favicon Generator
ImageTurn a brand color and logo into a full set of favicon sizes.
QR Code Generator
ImageGenerate a QR code and style it using a color from your palette.