liveBook · Manning

Hexadecimal color notation

Also called hex color, hex triplet, RGB hex codes

Hexadecimal color notation is a textual representation of color components using hexadecimal digits, typically encoding red, green, blue, and optionally alpha.

How 4 Manning books explain it

CSS in Depth, Second Edition

Hex color notation is a CSS color notation that encodes color components using hexadecimal digits, optionally including an alpha component.

How it is used
Specifies CSS colors and supplies an opaque fallback before a partially transparent background-color declaration.
How deep it goes
Defines component ranges, alpha, shorthand, and fallback behavior; identifies rather than resolves the notation’s wider-gamut limitation.
Examples
Uses #80c090 for component decoding, #c90 for shorthand, and paired aside backgrounds for an eight-digit fallback.
What you can do after
Operate/configure CSS colors by reading hex components, using alpha or shorthand, and placing a fallback before an eight-digit value.

Read how CSS in Depth, Second Edition explains hexadecimal color notation →

Web Design Playground

A hexadecimal notation for specifying a color by encoded red, green, and blue channel values.

How it is used
Specifies CSS colors for elements and supplies starting colors for page color schemes.
How deep it goes
Defines the #rrggbb pattern and channel ranges, then works through a CSS rule without teaching hexadecimal conversion beyond one example.
Examples
Uses a purple heading rule and color-scheme examples beginning with #77613c and #ffc200.
What you can do after
Apply it via CSS to color text, or enter a hex triplet into the Web Design Playground’s color tools.

Read how Web Design Playground explains hexadecimal color notation →

Web Design Playground, Second Edition

An RGB hex triplet is a hexadecimal color notation consisting of three pairs of digits specifying red, green, and blue components.

How it is used
Specifies CSS text, background, and design colors alongside rgb(), hsl(), rgba(), and hsla().
How deep it goes
Explains component pairs, value ranges, alpha notation, shorthand, examples, and color-selection tools.
Examples
Uses purple headings, common-color codes, shorthand pairs, playground color choosing, and color-scheme calculation.
What you can do after
Apply it via CSS by writing RGB hex triplets, alpha-enabled codes, and valid shorthand color values.

Read how Web Design Playground, Second Edition explains hexadecimal color notation →

Math for Web Design

An RGB hex code is a three- or six-digit hexadecimal color notation encoding red, green, and blue component values.

How it is used
Specifies RGB colors in CSS and supplies color strings for JavaScript-based contrast checking.
How deep it goes
Explains component ranges, shorthand, alpha notation, and JavaScript parsing, then stops short of deriving hexadecimal arithmetic fully.
Examples
Uses purple CSS text, #3366cc and #36c shorthand, and a JavaScript contrast-ratio calculator.
What you can do after
Apply hexadecimal colors in CSS and convert three- or six-digit codes for contrast calculations in JavaScript.

Read how Math for Web Design explains hexadecimal color notation →

Also covered in

What to know first

Related concepts

Questions about hexadecimal color notation

What is hexadecimal color notation?

Hexadecimal color notation is a textual representation of color components using hexadecimal digits, typically encoding red, green, blue, and optionally alpha.

Which Manning books explain hexadecimal color notation?

CSS in Depth, Second Edition, Web Design Playground, Web Design Playground, Second Edition and Math for Web Design.

What should I know before learning hexadecimal color notation?

Manning books that teach hexadecimal color notation usually introduce CSS, color keyword, HTML and JavaScript first.

What is the difference between hexadecimal color notation and rgb() function?

Hexadecimal color notation is a textual representation of color components using hexadecimal digits, typically encoding red, green, blue, and optionally alpha. The CSS rgb() function specifies a color using red, green, and blue component values in the sRGB color space.

What is hexadecimal color notation also called?

Hexadecimal color notation is also called hex color, hex triplet or RGB hex codes.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.