photomopOpen the studio

Colour

Hex colour

Also called hex code, hex color or #ffffff. Here is what it means, when it changes what you export, and what people get wrong.

ColourRuns on your deviceUpdated 10 August 2026

The short answer

A hex colour is an RGB value written in base 16, prefixed with a hash. Each pair of digits gives one channel from 00 to FF, which is 0 to 255 in decimal. So #FFFFFF is pure white, #000000 is black, and #FF0000 is full red.

Updated

The short version

Hex colour at a glance

Quick facts about Hex colour: base, decimal equivalent, pure white, forms, alpha, colour space
Quick factDetail
BaseHexadecimal, 00 to FF per channel
Decimal equivalent00 is 0, FF is 255
Pure white#FFFFFF
Forms3, 4, 6 and 8 digit variants
AlphaThe optional fourth pair, 00 transparent to FF opaque
Colour spacesRGB on the web

Slide the table sideways to see every column.

How do you read a hex code?

Split it into pairs. In #3A7BD5 the first pair is red, the second green, the third blue, each running from 00 to FF. Because hexadecimal counts 0 to 9 then A to F, FF is 255 and 80 is 128.

Three shorthand forms exist alongside the standard six digits:

  • Three digits. #F80 expands to #FF8800 by doubling each digit. Handy, but it can only express a fraction of the full range.
  • Eight digits. #FF0000CC adds a fourth pair for alpha, where 00 is fully transparent and FF fully opaque.
  • Four digits. The shorthand version of the eight-digit form.

Why does #FFFFFF matter for product photos?

Because it is exactly what a pure white background requirement means. Amazon's product image requirements state a pure white background of RGB 255,255,255, and Walmart Marketplace asks for the same on main images. That single value, and nothing near it, is what an automated check looks for.

A photographed white backdrop almost never lands there. Studio paper under decent lighting typically samples somewhere in the region of #F7F7F5, which looks white to your eye, reads as a faintly grey rectangle against a white listing page, and fails a pure-white test. If you cannot light the backdrop up to full, replacing it is more reliable, and #FFFFFF is the value to set when you do it with a background replacement tool such as Photomop's.

Which colour space is a hex code in?

sRGB, by convention and by specification on the web. A hex code carries no profile of its own, so #3A7BD5 in a stylesheet is defined as an sRGB colour and will render as a slightly different blue if something interprets it in a wider space.

This matters when you match a brand colour between a website and a printed catalogue. The hex code fixes the screen colour; the ink equivalent has to be derived through a CMYK conversion or a spot colour reference, and some vivid hex colours simply cannot be printed.

What people get wrong about hex colour

Each one is a real failure mode, not a style preference.

  1. Treating an off-white such as #F8F8F6 as acceptable where a platform specifies pure white, when only #FFFFFF passes.

  2. Assuming the eight-digit form is understood everywhere, when older tools and some print workflows only accept six digits.

  3. Expecting a hex code to print exactly as it looks on screen, when vivid screen colours often fall outside what ink can reproduce.

  4. Sampling a hex value from a compressed JPEG edge, where compression artefacts shift the colour by several steps.

Questions people ask

Hex colour, answered

The follow-up questions people search for once they have the definition.

What is the hex code for pure white?

#FFFFFF, which is RGB 255,255,255. That is the exact value marketplaces mean when they require a pure white background. Anything lower in any channel, such as #FEFEFE, is technically a very light grey and can fail an automated check.

Can a hex colour be transparent?

Yes, using the eight-digit form where the final pair sets alpha, so #FFFFFF00 is fully transparent white. Support is normal in modern CSS and design tools, but many older applications and print workflows only accept the six-digit opaque form.

Why does #FF0000 look different on two screens?

Because the code names an sRGB red, and each display reproduces that instruction with its own primaries, brightness and calibration. On a wide-gamut screen in software that ignores colour management, it renders as a more saturated red than intended.

How do I get the hex code of a colour in my photo?

Use the eyedropper in any editor and switch the readout to hexadecimal. Sample several points rather than one, especially on a backdrop, because lighting falls off towards the corners and compression shifts values near edges.

From the studio

Tools that do this

Each one runs on your own device, so the photo stays where it is.

Sources

Where the facts on this page come from. Every link opens the specification, standard or documentation the claim was read at.

Now do it to a photo

Photomop is a photo studio that runs on your own device. Resize, crop, compress, convert, batch edit, remove a background and change one all work in the browser tab you are reading this in, at full resolution and with no watermark. The on-device page shows you how to check that the photo stays put.