Analytics choices

Analytics is optional. If allowed, Google measures public pages, navigation, recognized acquisition sources and engagement, including tool and playground use. The site excludes entered code, search terms and form contents from its Analytics events. You can withdraw here. This choice does not change advertising consent.

Read about Analytics and your information.

HTML Colors

Complete color reference with names, hex codes, and RGB values

Quick Answer

How do HTML colors work?

HTML colors can be specified in multiple formats: color names (red, blue), hex codes (#FF0000), RGB values (rgb(255, 0, 0)), or HSL (hsl(0, 100%, 50%)). Hex codes are most common for precise color control, while named colors offer simplicity. Alpha transparency can be added using RGBA or HSLA.

Working with HTML Colors

Colors are essential for creating visually appealing and accessible web pages. HTML supports multiple ways to specify colors, including color names, hexadecimal codes, RGB values, and HSL values. Understanding these different formats helps you choose the right approach for your project.

HTML recognizes 140 standard color names like red, blue, green, and more complex names like cornflowerblue or lightseagreen. These named colors provide an easy way to add color without memorizing codes. However, hexadecimal and RGB values offer greater precision and access to millions of color variations.

Hexadecimal color codes use a six-digit format preceded by a hash symbol, such as #FF5733. The first two digits represent red, the middle two represent green, and the last two represent blue. RGB values use a function format like rgb(255, 87, 51), specifying the intensity of red, green, and blue from 0 to 255.

When choosing colors, consider web accessibility guidelines. Ensure sufficient contrast between text and background colors so that all users, including those with visual impairments, can read your content comfortably. Use the interactive color picker below to explore different colors and find the perfect shade for your design.

Interactive Color Picker

HEX: #
RGB: rgb(59, 130, 246)
HSL: hsl(217, 91%, 60%)

Red Colors

Orange Colors

Yellow Colors

Green Colors

Blue Colors

Purple Colors

Brown & Pink Colors

Gray & White Colors