Back to Learning
💻

CSS Color Keywords

Learn about predefined CSS color keywords

Introduction

CSS provides a set of predefined color keywords such as 'red', 'blue', 'green', and others.

Basic Colors

red
blue
green
yellow

Extended Colors

CSS also includes many extended colors such as coral, skyblue, tomato, teal, and many others.

coral
skyblue
tomato
teal

Usage

Color keywords are convenient for quick use but are limited in the number of available colors. For precise colors, it's better to use HEX or RGB.

CSS Color Keywords: Complete Reference for Web Developers

CSS provides an extensive set of predefined color keywords, from basic (red, blue, green) to extended (coral, skyblue, tomato, teal). These keywords simplify color work in CSS but have limitations in precision and number of available shades.

In this detailed guide, we'll cover all CSS color keywords, their applications, advantages, and disadvantages. You'll learn how to use поиск названия цвета to find color names, work with конвертер цветов to convert keywords to HEX/RGB, and apply генератор UI токенов to create design systems based on CSS colors.

Basic and Extended CSS Color Keywords

The CSS standard defines 147 color keywords, including basic colors (red, blue, green, yellow, black, white, gray) and an extended palette (coral, skyblue, tomato, teal, lavender, salmon, turquoise, and many others).

Each keyword corresponds to a specific HEX value, for example, 'red' is equivalent to #FF0000, 'blue' is #0000FF. These keywords are convenient for quick prototyping and learning but are limited in precision.

For professional projects, it's recommended to use HEX, RGB, or HSL formats for precise color control. The поиск названия цвета tool allows finding the name of any color, including CSS keywords, and getting their exact HEX/RGB values.

Practical Application of CSS Color Keywords

CSS color keywords are used in properties like color, background-color, border-color, and others. Syntax is simple: color: red; background-color: blue;. They are especially useful for quick prototyping, learning, and creating simple interfaces.

However, for precise brand colors, gradients, and complex design systems, it's better to use HEX or RGB values. Modern tools like конвертер цветов allow instant conversion of CSS keywords to HEX, RGB, HSL formats, which is critical when working with design mockups.

When creating design systems, генератор UI токенов uses precise color values instead of keywords to ensure consistency and control.

Limitations and Best Practices

The main limitation of CSS color keywords is a fixed set of 147 colors, which is insufficient for modern design projects. Also, there's no control over shades, saturation, and brightness.

For creating themes, gradients, and accessible interfaces, precise color values are necessary. When working with branding, it's important to use precise brand colors, not approximate keywords.

For contrast checking, use проверка контраста, which works with precise color values. When creating color palettes, генератор палитр generates harmonious combinations based on precise HEX/RGB values, not keywords.

Заключение

CSS color keywords are a convenient tool for quick prototyping and learning, but for professional projects, it's recommended to use precise color formats (HEX, RGB, HSL) for full color control and design consistency.