Skip to content
Design

Color Utility

Convert HEX, RGB, HSL colors and check WCAG contrast ratio for accessibility.

Guide: How to use & features

  • Enter a color as HEX, RGB, or HSL to see the other formats instantly.
  • Set foreground and background colors to view the contrast ratio and WCAG status.
  • Use the preview text to judge readability and adjust colors as needed.
  • Copy outputs directly into design tools or CSS files.

Samples: Sample input & output

HEX から RGB/HSL に変換

Input

#1d4ed8

Output

RGB: rgb(29, 78, 216)
HSL: hsl(221, 76%, 48%)

FAQ: FAQ

  • When should I use HEX, RGB, or HSL?

    HEX (#1a2b3c) is widely used in CSS and design tools; RGB uses red/green/blue values and handles transparency (RGBA) easily; HSL uses hue, saturation, and lightness, making "a bit lighter" or "a bit more vivid" adjustments intuitive. This tool converts between them so you can pick whichever fits the task.
  • What WCAG contrast ratio counts as passing?

    Normal-size text passes AA at a contrast ratio of 4.5:1 or higher and AAA at 7:1 or higher. Large text (roughly 18pt+, or 14pt+ bold) passes AA at 3:1. Use the contrast checker to measure the ratio between foreground and background and judge whether it meets the threshold.
  • Can it handle colors with transparency (alpha)?

    Yes — notations like RGBA and HSLA express semi-transparent colors with an alpha value. Note, though, that contrast depends on how a color actually appears over its background, so check a semi-transparent text color using its composited result against the background for accuracy.

Use cases: Common use cases

  • Convert design colors to CSS formats

    Transform HEX values into RGB/HSL for style guides or CSS variables.

  • Check contrast compliance

    Verify foreground/background pairs against WCAG contrast requirements.

  • Tune palettes and share values

    Preview readability, tweak colors, and share codes with your team.

Notes: Notes & limitations

  • Work stays in your browser

    Inputs and outputs remain local. Closing the tab or clearing cache will remove any temporary state.

  • Validate critical data

    Results are helper outputs—double-check them before sending to production systems or sharing externally.

  • Large payloads depend on your device

    Very large text or files can feel slow in some browsers. Use a desktop environment for heavy workloads.

Color Conversion

HEX
#007BFF
RGB
rgb(0, 123, 255)
HSL
hsl(211, 100%, 50%)

Contrast Checker (WCAG)

Contrast Ratio 21.00
Normal Text
AA (4.5:1)
AAA (7.0:1)
Large Text
AA (3.0:1)
AAA (4.5:1)
Preview

The quick brown fox jumps over the lazy dog.

Color Converter and Contrast Checker

Design and frontend work often moves between HEX, RGB, and HSL color formats. This tool converts color values and helps check contrast between foreground and background colors so UI text and controls remain readable.

Common use cases

  • Convert CSS colors: Move between HEX, RGB, and HSL when implementing designs.
  • Check readability: Compare text and background colors before shipping UI changes.
  • Create color variations: Use HSL to adjust lightness or saturation for hover states, borders, and subtle backgrounds.

Accessibility note

Color contrast affects readability, especially on mobile screens and bright displays. Do not rely on color alone to communicate state; combine color with text, icons, labels, or layout cues.

Articles for this tool

Recent Articles

Use Case
2026-08-07

curl Options Cheat Sheet: What -X, -H and -d Actually Do

A reference for the curl options you meet in real API work: why -d already implies POST, how -d differs from --data-raw, the @ prefix that silently reads a file, single vs double quotes, and why -k and -L deserve more caution than they usually get.

Introduction
2026-08-06

Converting Between JSON Schema and Zod: How required Maps to .optional()

Inside a two-way converter that turns JSON Schema into a Zod schema and Zod code back into JSON Schema. Covers the inverted defaults between required and .optional(), the constraint mapping table, and how the Zod side is parsed without executing any code.

Use Case
2026-08-06

SQL Clause Order Reference: Why WHERE Can't See Your SELECT Alias

The order you write SQL clauses is not the order the database runs them. A reference for the logical execution order (FROM → WHERE → GROUP BY → HAVING → SELECT → ORDER BY → LIMIT), why aliases fail in WHERE, when to use WHERE vs HAVING, and the MySQL/PostgreSQL differences that bite.

Use Case
2026-08-06

Unified Diff Format Reference: Reading @@ Hunks in git diff Output

How to read the unified diff format git produces: what the four numbers in @@ -12,7 +12,9 @@ mean, why a one-character edit shows as a whole-line replacement, the whitespace and line-ending traps, \ No newline at end of file, combined @@@ diffs on merges, and rename detection via similarity index.

Use Case
2026-08-06

UTC to JST Reference: The 9-Hour Offset, Cheat Sheet & Timezone Pitfalls

Convert between UTC and JST (Japan Standard Time) with a cheat sheet. Covers what Z and +09:00 mean in ISO 8601, when JavaScript date parsing silently shifts by 9 hours, MySQL/PostgreSQL timezone behavior, and why GitHub Actions cron always runs in UTC.

Use Case
2026-08-04

CREATE TABLE Reference: MySQL vs PostgreSQL vs SQLite Types & Constraints

A cross-database CREATE TABLE (DDL) reference with cheat sheets for data types, auto-increment keys (AUTO_INCREMENT / IDENTITY / rowid), foreign key ON DELETE behavior, and the CHECK constraint that MySQL silently ignores.

Ad

Ad