{"content":{"intro":"The Color Format Converter translates colours between HEX, RGB and HSL, the three formats used most in web design, CSS and design tools, and shows a preview of the colour.","sections":[["The three formats","HEX (#8b5cf6) and RGB (rgb(139, 92, 246)) describe the same thing: amounts of red, green and blue from 0 to 255, written in hexadecimal or decimal. HSL describes a colour by hue (an angle on the colour wheel, 0–360°), saturation (how vivid, 0–100%) and lightness (how light, 0–100%)."],["Why designers like HSL","HSL makes adjustments intuitive: to make a darker shade, lower the lightness; for a muted version, lower the saturation; for a different colour with the same feel, change only the hue. That's much harder to do by editing RGB numbers."],["Small rounding differences","HSL values are rounded to whole numbers, so converting a colour to HSL and back can occasionally shift a channel by 1. The difference is invisible to the eye."]],"faqs":[{"q":"What formats can I type?","a":"HEX with or without # (including 3-digit shorthand like #fff), rgb(…) and hsl(…)."},{"q":"Which format should I use in CSS?","a":"All three work in every modern browser. HEX is compact; HSL is easiest to adjust by hand."},{"q":"What does the hue number mean?","a":"It's a position on the colour wheel: 0° is red, 120° is green and 240° is blue."}]},"sfaq":[{"q":"What's the difference between RGB and HSL?","a":"RGB defines a color by red, green, and blue intensity, while HSL uses hue, saturation, and lightness: HSL is often more intuitive for adjusting a color's shade or brightness."}],"copy":{"explain":"Your colour is read in whichever format you type or pick, converted to red, green and blue values, and written out as HEX, RGB, HSL, HSV/HSB, CMYK and the modern space-separated CSS rgb(). CMYK is a simple screen-to-print estimate, not a printer profile.","example":"#8b5cf6 → RGB rgb(139, 92, 246) · HSL hsl(258, 90%, 66%) · HSV hsv(258, 63%, 96%) · CMYK cmyk(43%, 63%, 0%, 4%). Type hsl(120, 100%, 25%) and you get #008000. Tap any row to copy it, or a shade to switch to it.","intro":"The Color Format Converter translates any colour between HEX, RGB, HSL, HSV/HSB and CMYK as you type, with a colour picker, a live preview, a text-contrast check for white and black text, and a row of tints and shades. Tap any value to copy it.","sections":[["The formats","HEX (#8b5cf6) and RGB (rgb(139, 92, 246)) describe amounts of red, green and blue from 0 to 255. HSL describes hue (0–360°), saturation and lightness; HSV/HSB, used in design apps like Photoshop and Figma, uses brightness instead of lightness. CMYK is the cyan, magenta, yellow and black used in printing."],["Why designers like HSL","HSL makes adjustments intuitive: to make a darker shade, lower the lightness; for a muted version, lower the saturation; for a different colour with the same feel, change only the hue. The tints and shades row does the lightness part for you."],["About the CMYK value","Screens mix light (RGB) and printers mix ink (CMYK), and printers can't reproduce every screen colour. The CMYK figure here is the standard mathematical conversion, which is fine for a starting point; for exact print colours, ask your printer for their colour profile."]],"faqs":[{"q":"What formats can I type?","a":"HEX with or without # (including 3-digit shorthand like #fff), rgb(…) and hsl(…). Or use the colour picker."},{"q":"Which format should I use in CSS?","a":"HEX, rgb() and hsl() all work in every modern browser. HEX is compact; HSL is easiest to adjust by hand."},{"q":"Is my colour readable as text?","a":"The text-contrast boxes show the contrast ratio with white and black text and whether it passes the 4.5:1 accessibility guideline."}]},"feat":[["Five formats","HEX, RGB, HSL, HSV/HSB and CMYK."],["Picker and preview","Choose visually or type a code."],["Contrast check","For white and black text."],["Tints and shades","A row of lighter and darker versions. Tap to copy."]],"faqx":[{"q":"How do I convert HEX to RGB by hand?","a":"Split the six-digit code into three pairs and convert each pair from base 16 to a number from 0 to 255. For #8B5CF6, 8B is 139, 5C is 92 and F6 is 246, giving rgb(139, 92, 246). The converter does this instantly as you type."},{"q":"What is the difference between HSL and HSV?","a":"Both use the same hue angle but treat brightness differently: in HSL, 100% lightness is always white and full colour sits at 50%, while in HSV (also called HSB), 100% value is the brightest form of the colour. Design apps like Photoshop often use HSB, while CSS uses HSL."},{"q":"Why doesn't the CMYK value match what my printer uses?","a":"The CMYK shown is a simple mathematical estimate from the RGB values, with no printer or paper profile. Real print results depend on the press, ink and paper, so ask your printer for their exact CMYK values or a colour proof for important brand colours."},{"q":"What contrast ratio does text need?","a":"The WCAG accessibility guideline asks for at least 4.5:1 for normal text and 3:1 for large text. The contrast check shows the ratio for white and black text on your colour, marking it AA, Large text only, or Too low."},{"q":"What is the CSS rgb() row with no commas?","a":"It is the newer space-separated CSS syntax, like rgb(139 92 246), which means the same as rgb(139, 92, 246). All current browsers support both forms, so use whichever matches the style of your existing stylesheet."},{"q":"Is #FFF the same as #FFFFFF?","a":"Yes. A three-digit HEX code is shorthand where each digit is doubled, so #FFF means #FFFFFF and #8B5 means #88BB55. The converter accepts both, with or without the # sign, and HEX codes are not case-sensitive."},{"q":"Does it keep transparency from rgba() or hsla()?","a":"No. You can paste rgba() or hsla() values and the colour is read, but the alpha (transparency) part is ignored and all results are for the solid colour. Eight-digit HEX codes with an alpha value are not read."},{"q":"What are tints and shades?","a":"A tint is a lighter version of a colour and a shade is a darker one. The row below the converter keeps your hue and saturation and steps lightness from 95% down to 15%. Tap any of them to switch the converter to that colour."}]}