<?xml version="1.0" encoding="utf-8"?>

Hex code

Hex code

A hex code is a representation of how much red, green, and blue exist in a color. It's expressed as a six-digit combination of numbers and letters, preceded by a pound (#) sign. Hex color codes are used in CSS to define the color of an element.[1]

Pro Tip: You don’t need to know exactly how hex codes are calculated — there are plenty of tools to convert colors into their hex values for you.

Improve your UX & Product skills with interactive courses that actually work