What is the Difference Between Hex, RGB, and CMYK?
When it comes to design and branding, colours play a vital role in creating the right impression. Whether you’re designing a website, printing marketing materials, or creating a logo, choosing the correct colour format is essential. Three common colour models you’ll encounter are Hex, RGB, and CMYK. But what exactly are they, how do they differ, and when should you use each one? Let’s explore!
What is Hex Code?
Hex code (short for hexadecimal code) is a six-digit code used primarily in web design to represent colours. It starts with a hashtag (#) followed by six alphanumeric characters. These characters represent the intensity of red, green, and blue (RGB) in a colour.
Example: #FF5733
FF represents red.
57 represents green.
33 represents blue.
Hex codes are favoured by web designers because they are compact and supported by all web browsers. They’re used in HTML, CSS, and design tools to ensure consistent colours across digital platforms.
When to use Hex:
- Website design
- Mobile apps
- Digital graphics and advertisements
What is RGB?
RGB stands for Red, Green, Blue. This colour model is based on light and is used for digital screens, including televisions, computers, and smartphones. RGB colours are expressed in values ranging from 0 to 255 for each colour component.
Example: rgb(255, 87, 51)
represents the same colour as #FF5733
.
255 is the highest intensity of red.
87 is the green value.
51 is the blue value.
The RGB model is additive. This means that the colours are created by adding light. The more you add, the closer you get to white; the less you add, the closer you get to black.
When to use RGB:
Digital screens and displays
Web graphics
Online advertisements and banners
What is CMYK?
CMYK stands for Cyan, Magenta, Yellow, and Key (Black). This is a subtractive colour model used in the printing process. Unlike RGB, the more colour you add in CMYK, the darker the result.
Colours are measured in percentages, from 0% to 100%.
Example: cmyk(0%, 66%, 80%, 0%)
corresponds to the same colour we’ve been discussing.
0% Cyan
66% Magenta
80% Yellow
0% Black
Printers use CMYK because they produce colours by combining these four ink colours. Using RGB colours for print can result in discrepancies since screens display colours differently from how printers render them.
When to use CMYK:
- Business cards, flyers, and brochures
- Posters and banners
- Magazines and packaging
How to Convert Hex to RGB and CMYK?
Converting Hex to RGB:
Take the hex code:
#FF5733
.Split it into three pairs:
FF
,57
, and33
.Convert each pair from hexadecimal to decimal:
FF
in decimal is 255 (Red)57
in decimal is 87 (Green)33
in decimal is 51 (Blue)
The RGB value is
rgb(255, 87, 51)
.
Tip: There are many free online tools where you can paste a hex code to get the RGB value instantly. Check out some of these in the “Useful Tools and Resources” section of this blog.
Converting Hex to CMYK:
Converting hex to CMYK can seem tricky, but here’s a step-by-step process that you can easily copy and use:
Convert Hex to RGB:
Take the hex code (e.g.,
#FF5733
).Split it into three pairs:
FF
,57
, and33
.Convert each pair from hexadecimal to decimal:
FF
= 255 (Red)57
= 87 (Green)33
= 51 (Blue)
Resulting RGB:
rgb(255, 87, 51)
.
Convert RGB to CMYK:
Use the following formulae:R = 255 / 255 = 1.0 G = 87 / 255 ≈ 0.341 B = 51 / 255 ≈ 0.2 K = 1 - max(R, G, B) = 1 - 1.0 = 0.0 C = (1 - R - K) / (1 - K) = (1 - 1 - 0) / (1 - 0) = 0% M = (1 - G - K) / (1 - K) = (1 - 0.341 - 0) / (1 - 0) ≈ 66% Y = (1 - B - K) / (1 - K) = (1 - 0.2 - 0) / (1 - 0) ≈ 80%
Final CMYK value:
cmyk(0%, 66%, 80%, 0%)
Tip: Use online converters (like convertAcolor or ColorHexa) to speed up the process and avoid manual calculation errors.

FAQs
- Why can colours look different on screen versus print?
Screens use the RGB model, while printers use CMYK. RGB is brighter because it uses light, whereas CMYK relies on ink, which can result in slight variations.
2. Should I design in RGB or CMYK?
Design for digital platforms in RGB and for printed materials in CMYK to ensure accurate colour representation.
3. Can I use Hex codes for printing?
Hex codes are primarily for digital use. Convert them to CMYK for print projects.
4. Why does my printed colour not match the digital proof?
Aside from colour models, factors like paper type, printer settings, and ink quality can affect the final output.
5. What is PMS and should I use it?
The Pantone Matching System (PMS) is a standardised colour system used in printing to ensure precise colour matching. It’s ideal for brand logos and materials where colour consistency is critical.
6. How can I ensure colour accessibility?
Use high-contrast colour combinations and test designs with tools like the WebAIM Contrast Checker to make your website accessible to all users, including those with visual impairments.
7. What about colour profiles like sRGB and Adobe RGB?
Colour profiles define how colours are represented on different devices. sRGB is standard for the web, while Adobe RGB offers a broader colour range, ideal for professional photography and printing.
Colour Psychology and Branding:
Colours influence how people perceive your brand. For example, blue evokes trust, red signifies urgency, and yellow conveys optimism, warmth, and friendliness. Choosing the right colours can enhance brand recognition and customer engagement.
Common Mistakes to Avoid:
- Designing in RGB for print without converting to CMYK.
- Ignoring how colours appear on different screens and devices.
- Not checking print proofs before mass production.
- Overlooking colour contrast and accessibility guidelines.
Useful Tools and Resources:
- Adobe Colour – Create and explore colour palettes.
- Coolors – Generate palette ideas quickly.
- convertAcolor – Easy-to-use colour converters.
- ColorHexa – Detailed colour information and conversion.
- WebAIM Contrast Checker – Ensure web accessibility compliance.
Quick Reference Table:
Format | Best For | Values Range | Example |
---|---|---|---|
Hex | Web Design | 00-FF (Hex) | #FF5733 |
RGB | Digital Media | 0-255 | rgb(255,87,51) |
CMYK | Printing | 0%-100% | cmyk(0%,66%,80%,0%) |
PMS | Precise Print Matching | Code-Based | PMS 172 C |
Testing Colours in Real Life:
Test your designs on multiple devices and print samples to see how colours appear in different contexts. Environmental lighting, screen calibration, and paper finish (glossy vs. matte) can also influence how colours are perceived.
Emerging Trends in Colour Usage:
With the rise of dark mode in apps and websites, designers should consider how colours shift in darker themes. Testing light and dark backgrounds ensures your content remains legible and visually appealing.
What is the Difference Between Hex, RGB, and CMYK?
Understanding the differences between Hex codes, RGB, and CMYK is crucial for any design project. Each serves its purpose, ensuring colours are accurately represented whether on a screen or in print. By choosing the correct format and converting wisely, you can maintain brand consistency and ensure your designs always look their best.
Need help with your branding or marketing materials? Contact The Last Hurdle on 01604 654545 or email hello@thelasthurdle.co.uk today – we’re here to help you leap over every design challenge!