Skip to content

HEX ↔ RGB ↔ HSL ↔ OKLCH ↔ Swift UIColor

Paste or type a color in one supported format and instantly get all conversions, with a live preview and a WCAG contrast check.

Input

WCAG contrast

The converted color is used as text on the background color you choose here.

Result

  • HEX

    #4F46E5

  • RGB

    rgb(79, 70, 229)

  • HSL

    hsl(243, 75%, 59%)

  • OKLCH

    oklch(51.06% 0.23005 276.97)

  • OKLab

    oklab(51.06% 0.0279 -0.22836)

  • Swift UIColor

    UIColor(red: 0.31, green: 0.275, blue: 0.898, alpha: 1)

Contrast ratio

6.28:1

  • AA · Normal text Pass (4.5:1)
  • AA · Large text Pass (3:1)
  • AAA · Normal text Fail (7:1)
  • AAA · Large text Pass (4.5:1)

Sample heading

Sample text: this is how a paragraph looks with these two colors.

Large text: At least 24px, or 18.66px bold.

Quick guide

How to use Color Format Converter

Color Format Converter is an online tool that helps you Convert HEX, RGB, HSL, OKLCH and Swift UIColor in real time, with a preview and a WCAG contrast check. Everything lives on a dedicated page, so you can open it again later or share it with a direct link.

This page is linked from the See the full tools index index and from related utilities, which keeps it easy to reach for both users and crawlers. If you need a fast workflow, you can use it immediately without sign-up.

This page keeps readable content, a stable URL, and internal links to other tools on the site. That is the right setup to improve discovery and support long-term organic indexing.

FAQ

Color Format Converter helps you Convert HEX, RGB, HSL, OKLCH and Swift UIColor in real time, with a preview and a WCAG contrast check. The result is immediate and the tool runs directly in the browser.