Hex Color Code
Embed This Widget
Add the script tag and a data attribute to embed this widget.
Embed via iframe for maximum compatibility.
<iframe src="https://colorfyi.com/iframe/glossary/hex-color/" width="420" height="400" frameborder="0" style="border:0;border-radius:10px;max-width:100%" loading="lazy"></iframe>
Paste this URL in WordPress, Medium, or any oEmbed-compatible platform.
https://colorfyi.com/glossary/hex-color/
Add a dynamic SVG badge to your README or docs.
[](https://colorfyi.com/glossary/hex-color/)
Use the native HTML custom element.
A six-character alphanumeric representation of a color using hexadecimal notation, prefixed with a hash symbol (#).
Hex color codes are the most common way to specify colors in web development. The six characters represent three pairs of hexadecimal values (00-FF) for red, green, and blue channels respectively. For example, #FF0000 is pure red (FF red, 00 green, 00 blue) and #FFFFFF is white. A shorthand three-character notation exists for colors with doubled digits: #F00 equals #FF0000. An eight-character variant adds an alpha channel for transparency (#FF000080 is semi-transparent red). Hex codes are case-insensitive and universally supported in CSS, HTML, and design tools.
Try It Out
Related Articles
Building a Color Picker Web Component from Scratch
Build an accessible color picker as a Web Component. Implement canvas rendering, hue sliders, alpha channels, and custom events with Shadow DOM.
What Is a Hex Code? The Language of Digital Color
Learn what hex color codes are, how the hexadecimal system encodes RGB values, 3-digit shorthand, 8-digit alpha hex, and how to find hex codes for any color.
Understanding Hex Color Codes: The Complete Guide
Master hex color codes from the ground up. Learn what #RRGGBB means, how to read any hex value, shorthand notation, alpha transparency, and how to convert between formats.