Color Converter
Convert a color into over 35 formats: HEX, RGB, HSL, HSV, HWB, CMYK, CIE Lab, LCH, OKLab, OKLCH, XYZ, Display-P3, CSS names and code for CSS, Tailwind, Swift, Kotlin, Flutter, Java, Python and Unity. Paste any format, use the picker or the eyedropper, check WCAG contrast and generate palettes and tonal scales.
Converti Colore
Accepts HEX (3, 4, 6, 8 digits, with or without #), rgb(), hsl(), hwb(), hsv(), cmyk(), lab(), lch(), oklab(), oklch(), color(display-p3 …), CSS names, 0xRRGGBB and "88, 166, 255". The Lab/LCH D65, XYZ, integer and programming-language rows are for copying, not pasting.
HEX
RGB
HSL
CMYK
Sfumature
All codes
The current color in every format: press "Copy" next to the code you need.
Web and CSS
- HEX
#58A6FF - HEX 3Not representable with this color
- HEX 4 (con alfa)Not representable with this color
- HEX 8 (RRGGBBAA)
#58A6FFFF - RGB
rgb(88, 166, 255) - RGBA
rgba(88, 166, 255, 1) - RGB moderno
rgb(88 166 255) - RGB percentuale
rgb(34.5% 65.1% 100%) - HSL
hsl(212, 100%, 67%) - HSLA
hsla(212, 100%, 67%, 1) - HWB
hwb(212 35% 0%) - OKLab
oklab(0.7153 -0.0436 -0.1454) - OKLCH
oklch(0.7153 0.1518 253.31) - lab() CSS (D50)
lab(66.19 -3.65 -52.24) - lch() CSS (D50)
lch(66.19 52.37 266) - Display-P3
color(display-p3 0.4209 0.6437 0.9731) - XYZ D65 (CSS)
color(xyz-d65 0.3571 0.3657 0.9979) - Nome CSS più vicino
cornflowerblue
Color models and numbers
- HSV / HSB
hsv(212, 65%, 100%) - CIE Lab (D65)
66.95, 3.24, -51.24 - LCH (D65)
66.95, 51.34, 273.62 - XYZ (D65, 0-100)
35.71, 36.57, 99.79 - CMYK
cmyk(65%, 35%, 0%, 0%) - Decimale 0xRRGGBB
0x58A6FF - Intero
5809919
For code
- CSS custom property
--color: #58a6ff; - Tailwind arbitrary
bg-[#58a6ff] - SCSS
$color: #58a6ff; - Swift (UIColor)
UIColor(red: 0.345, green: 0.651, blue: 1.000, alpha: 1) - Swift (SwiftUI Color)
Color(.sRGB, red: 0.345, green: 0.651, blue: 1.000, opacity: 1) - Kotlin (Compose)
Color(0xFF58A6FF) - Android XML (#AARRGGBB)
#FF58A6FF - Flutter
Color(0xFF58A6FF) - Java (java.awt.Color)
new Color(88, 166, 255) - Python (tupla)
(88, 166, 255) - Unity (Color32)
new Color32(88, 166, 255, 255)
Come utilizzare Color Converter
Inserisci o scegli un colore
Incolla un codice in qualsiasi formato (HEX, rgb(), hsl(), oklch(), nome CSS, 0xRRGGBB), usa il color picker oppure il contagocce, se il tuo browser lo supporta.
Imposta la trasparenza
Con il campo alfa regoli la trasparenza da 0 a 100%: HEX a 8 cifre, rgba() e i codici Android e Flutter la includono.
Leggi il colore in tutti i formati
Il pannello «Tutti i codici», sotto i convertitori, elenca il colore in oltre 35 formati: CSS, modelli colore (HSV, Lab, OKLCH, XYZ, CMYK) e codice per Tailwind, Swift, Kotlin, Flutter, Java, Python e Unity.
Modifica da RGB, HSL o CMYK
Puoi anche modificare i valori nei campi RGB, HSL o CMYK: tutti gli altri formati si aggiornano di conseguenza.
Esplora palette, contrasto e scale
Nella barra laterale trovi le palette armoniche, il contrasto WCAG su bianco e su nero, la scala tonale a 9 gradini e i colori web-safe più vicini.
Copia il valore nel formato preferito
Premi «Copia» accanto al codice che ti serve per copiarlo negli appunti e incollarlo nel tuo codice o nel software di grafica.
Suggerimenti
- Puoi incollare un codice HEX senza il simbolo # oppure direttamente un rgb(), un hsl() o un nome CSS: il convertitore riconosce il formato da solo.
- Usa le scale tonali e le sfumature generate per creare scale di colori coerenti per i tuoi componenti UI.
- Per i progetti di stampa, verifica sempre il valore CMYK: i colori molto saturi in RGB potrebbero risultare diversi su carta.
- Il colore è nell’indirizzo della pagina (?c=58a6ff): copia il link dalla barra del browser per condividerlo.
Domande frequenti
How to convert a color from HEX to RGB?
Enter the hexadecimal code (#e.g. #58a6ff) in the designated field and the converter will automatically calculate the corresponding RGB values (e.g. rgb(88, 166, 255)).
What is the difference between HSL and RGB?
RGB describes a color through its red, green, and blue components (values 0-255). HSL describes the color through hue (Hue, 0-360°), saturation (Saturation, 0-100%) and lightness (Lightness, 0-100%), making it more intuitive for designers.
When to use CMYK?
CMYK (Cyan, Magenta, Yellow, Black) is the printing format used. Unlike RGB, which is an additive model for screens, CMYK is a subtractive model that describes ink percentages to apply.
How does the color palette generator work?
The generator automatically calculates harmonious palettes from the base color: the complementary palette uses the opposite color on the chromatic circle (offset +180°), the triadic palette uses three colors equidistantly (+120° and +240°), the analogous palette uses adjacent colors (-30° and +30°).
Can I save previously used colors?
Yes: the colors you confirm (from the code field, the picker, by copying a code or choosing a palette) are saved in the history, which keeps the last 8 and persists in the browser through localStorage. Click a previous color to reload it.
Which formats can I paste into the code field?
HEX with 3, 4, 6 or 8 digits (also without #), rgb() and rgba(), hsl() and hsla(), hwb(), hsv(), cmyk(), CSS lab() and lch(), oklab(), oklch(), color(display-p3 …), CSS names, 0xRRGGBB and triples such as 88, 166, 255. If the format is not recognized an error message appears and the current color stays unchanged.
Why are there two Lab rows, with D65 and with D50?
CIE Lab depends on the reference white. The CSS lab() function uses the D50 white, while many tools and libraries use D65. The tool shows both: the "CIE Lab (D65)" values and the "lab() CSS (D50)" rows, ready to paste into stylesheets.
How is WCAG contrast calculated?
The tool computes the contrast ratio between the color and white, and between the color and black, using WCAG 2.x relative luminance. Level AA requires at least 4.5:1 for normal text (3:1 for large text), level AAA 7:1 (4.5:1 for large text).
What happens with colors outside the sRGB gamut?
A color expressed in Lab, OKLCH or Display-P3 may not exist in sRGB. In that case the channels are limited to 0-255 (a simple clip, not the CSS gamut mapping) and a notice appears: the result is representable, but it is not necessarily the perceptually closest color.