Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

Color Converter

Convert a color between HEX, RGB, HSL, HSV, HWB, CMYK, OKLCH and OKLAB. Type into any field and the others update as you go, or pick the color visually. Reads CSS color syntax and keeps alpha where the format supports it.

Everything runs locally in your browser. Your data never leaves your device.

100%

Next steps

Keep going. These tools open with your result loaded in.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

Convert between scientific notation and full numbers as you type. Reads 1.23e5, 1.23 × 10^5 and plain numbers, shows the value written out, in normalized scientific notation and in engineering notation, and can round to any number of significant digits.

About the Color Converter Tool

This tool translates one color into every common notation at once. Type a value into any field, HEX, RGB, HSL, HSV, HWB, CMYK, OKLCH or OKLAB, and the other fields update as you go. If you would rather not type, open the picker and choose the color visually.

Each field reads the CSS syntax you would actually write, so rgb(59 130 246), hsl(217, 91%, 60%) and #3b82f6 all work. Formats with an alpha channel keep it, and the preview shows the transparency.

What you can do

  • Convert HEX to RGB, HSL, HSV, HWB, CMYK, OKLCH or OKLAB, and back.
  • Paste any CSS color value and read it in every other notation.
  • Pick a color visually and copy it in the format you need.
  • Convert colors with an alpha channel, including 8-digit hex.
  • Copy each notation as a ready-to-paste CSS value.

How to use the Color Converter

  1. 1Type or paste a color into the field whose format you have, or pick one with the color picker.
  2. 2Read the same color in every other format below.
  3. 3Copy the field you need with the button next to it.

Which format for what

HEX and RGB are what most tools and code expect. HSL and HSV describe a color by hue, which makes them easier to adjust by hand. HWB mixes a hue with white and black, which some designers find more intuitive. CMYK approximates ink coverage for print work. OKLCH and OKLAB are the modern perceptual spaces from CSS Color 4, where equal numeric steps look like equal visual steps, which makes them a good base for building palettes.

CMYK has no alpha channel and the conversion is a plain formula, not a color-managed one, so treat it as a starting point for print, not a proof.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Check two colors against the WCAG contrast rules. Type or pick a text and a background color, read the contrast ratio, see which AA and AAA checks pass, preview real text at the sizes WCAG distinguishes, and get suggested fixes when a check fails.

Generate color palettes from a base color using real color harmonies like complementary, analogous, triadic and monochromatic tints and shades. Adjust and lock individual colors, then copy the palette as HEX values, CSS variables or Tailwind config.

Convert config and data between JSON, YAML, TOML, JSON5, INI, XML, CSV and .env. Type or paste on the left, pick the output format on the right, and copy the result. Includes a format button and a minify toggle.

Build linear, radial and conic CSS gradients visually: add and drag color stops, set the angle or center, preview the result live and copy the generated CSS. Includes ready-made presets to start from.

Convert between px, rem, em, percent, pt and viewport units with a configurable root font size. Type into any field and the others update as you go, set the parent font size for em math, and read a conversion table for common sizes.