Skip to content

Colour Format Converter

One colour, every format at once — HEX, RGB, HSL, HSV, HWB, CMYK, LAB, LCH, LUV, XYZ, OKLAB, OKLCH and CSS color(), with copy-ready snippets for six platforms.

#4F46E5FF

royalblue (nearest)

Inside the sRGB gamut.

All formats

HEX#4F46E5
HEX8#4F46E5FF
RGBrgb(79, 70, 229)
RGBArgba(79, 70, 229, 1)
HSLhsl(243.4, 75.4%, 58.6%)
HSLAhsla(243.4, 75.4%, 58.6%, 1)
HSV / HSBhsv(243.4, 69.4%, 89.8%)
HWBhwb(243.4 27.5% 10.2%)
CMYKcmyk(65.5%, 69.4%, 0%, 10.2%)
LAB (D65)lab(40.734% 50.635 -79.081)
LCHlch(40.734% 93.903 302.63)
LUVluv(40.734% -6.397 -115.594)
XYZX 0.1956 Y 0.117 Z 0.7536
Linear RGB0.0782, 0.0612, 0.7835
OKLABoklab(0.5106 0.0279 -0.2284)
OKLCHoklch(0.5106 0.2301 276.97)
CSS color()color(srgb 0.3098 0.2745 0.898)
Named colourroyalblue (nearest)

Code snippets

CSS
:root {
  --colour: #4F46E5FF;
  --colour-rgb: 79 70 229;
}

.thing {
  color: #4F46E5;
  background: oklch(0.5106 0.2301 276.97);
}
SCSS
$colour: #4F46E5;
$colour-alpha: rgba(79, 70, 229, 1);
$colour-hsl: hsl(243.4, 75.4%, 58.6%);
Tailwind
// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        brand: {
          DEFAULT: "#4F46E5",
          rgb: "rgb(79 70 229 / <alpha-value>)",
        },
      },
    },
  },
};
Android XML
<!-- res/values/colors.xml -->
<color name="brand">#FF4F46E5</color>
iOS / Objective-C
UIColor *brand = [UIColor colorWithRed:0.3098 green:0.2745 blue:0.898 alpha:1];
SwiftUI
extension Color {
    static let brand = Color(red: 0.3098, green: 0.2745, blue: 0.898, opacity: 1)
    // or: Color(hex: 0x4F46E5)
Flutter
const Color brand = Color(0xFF4F46E5);
// MaterialColor
const MaterialColor brandSwatch = MaterialColor(0x4F46E5, <int, Color>{ 500: Color(0x4F46E5) });
Java
Color brand = new Color(79, 70, 229, 255);
// or
Color decode = Color.decode("#4F46E5");

About this tool

Conversions use the sRGB transfer function with the D65 white point, and the 3×3 matrices for XYZ, CIE LAB/LUV and OKLab are the published ones, so the numbers match what design tools report. Anything outside the 0–1 linear sRGB range is flagged as out of gamut, which is what happens to saturated P3 or Rec.2020 colours. All maths runs locally in your browser — no image or colour value is ever uploaded.

  • 100% free — no account needed
  • Runs in your browser
  • Nothing is uploaded

Frequently asked questions

Is Colour Format Converter really free?

Yes. Colour Format Converter is completely free on PureBrowser — every feature, with no account, no trial, and no credit card.

Does Colour Format Converter upload my data?

No. Colour Format Converter runs entirely inside your browser, so anything you type, paste, or open stays on your own device.

Do I need to sign up or install anything?

Neither. There is no account and nothing to download — open the page and Colour Format Converter is ready to use on desktop or mobile.

Does Colour Format Converter work offline?

Once the page has loaded, yes. All of the processing happens locally in your browser, so it keeps working without a connection.