Colors

Not only is color an effective way to create brand recognition, but it also plays an important role in conveying information, providing interactive feedback, and bringing attention to a particular element. Ant Design makes using color simple and practical through an emphasis on efficiency, clarity, and user experience. Please note the following three points when choosing colors:

  • Color usage and positioning should respect cognitive psychology (stay user-focused)

  • Visual hierarchy should be clear-cut, and color should establish visual continuity

  • Color usage should be in compliance with the WCAG 2.0 standards by using sufficient contrast to ensure accessibility

Color Palettes#

Ant Design's color palettes consist of 10 shallow-to-deep color swatches, and default palettes are defined for certain hues. Users can select a swatch from the color scheme using keywords. In theory, all colors used in the design should be taken from a color palette.

After careful tuning by designers and programmers, our palette generation algorithm uses a combination of color plus Bezier curves and different rotation angles for cold and warm colors to generate new palettes (replacing our original tint / shade color system). This algorithm can be used to generate new palettes based on an input color that you specify.

Ant Design's default theme consists of eight basic colors, each of which is derived from the above algorithm.

Note: In these shallow-to-deep palettes, the 6th color cell generally satisfies WCAG 2.0's 4.5:1 minimum contrast ratio (AA level), and is used as the default for the palette.

red热情、警示
red-1
red-2
red-3
red-4
red-5
red-6
red-7
red-8
red-9
red-10
green成功、通过、安全
green-1
green-2
green-3
green-4
green-5
green-6
green-7
green-8
green-9
green-10
blue专业、科技
blue-1
blue-2
blue-3
blue-4
blue-5
blue-6
blue-7
blue-8
blue-9
blue-10
pink典雅、明快、女性
pink-1
pink-2
pink-3
pink-4
pink-5
pink-6
pink-7
pink-8
pink-9
pink-10
orange醒目、温暖
orange-1
orange-2
orange-3
orange-4
orange-5
orange-6
orange-7
orange-8
orange-9
orange-10
purple高雅、浪漫
purple-1
purple-2
purple-3
purple-4
purple-5
purple-6
purple-7
purple-8
purple-9
purple-10
yellow活力、提示
yellow-1
yellow-2
yellow-3
yellow-4
yellow-5
yellow-6
yellow-7
yellow-8
yellow-9
yellow-10
cyan清新、冷静、结构化
cyan-1
cyan-2
cyan-3
cyan-4
cyan-5
cyan-6
cyan-7
cyan-8
cyan-9
cyan-10
grey平稳、中性
grey-1
grey-2
grey-3
grey-4
grey-5
grey-6
grey-7
grey-8
grey-9
grey-10

In order to provide contrast against different background shades, we chose White #FFFFFF and Black #000000 with varying transparency to distinguish foreground text. For details, please see font color.

Palette Generation Tool#

If the above palettes do not meet your needs, you can choose a main color below, and Ant Design's color generation algorithm will generate a palette for you.

选择自定义主色
#108ee9
color-1#ECF6FD
color-2#D2EAFB
color-3#ADD8F7
color-4#7EC2F3
color-5#49A9EE
color-6#108EE9
color-7#0E77CA
color-8#0C60AA
color-9#09488A
color-10#073069

Color application#

Brand color application#

Ant Design's commonly used brand color values
Ant Design's commonly used brand color values

The brand color is one of the most intuitive visual elements used that is used to embody product characteristics and communicate ideas. When selecting colors, it is important to understand how the brand color is used in the user interface. Taking the default styles of an Ant Design web component as an example, the brand color is mainly reflected in key actions and when highlighting important information.

Note: Images and logos can not automatically adhere to the color palette, but should be compatible.

Neutral color application#

Ant Design's neutral color values
Ant Design's neutral color values

Gray as a neutral color is used extensively in Ant Design's web design, and its use facilitates the targeting and functional guidance of key content. This color is mainly seen in the navigation frame, backgrounds, secondary operations, and so on.

Functional color application#

Ant Design's functional color card
Ant Design's functional color card

Functional colors are colors that are used to convey state. These are mainly used in notifications, form validations, status messages, etc. Green indicates success, yellow indicates alerts / warnings, red indicates errors, gray indicates skipped / disabled.

Visual hierarchy#

Good example
Good example
Guide the user's line of sight through brand color

Use the brand color to convey important information or to highlight important actions while surrounding it with large areas of neutral color. This allows users to focus more on the task itself, improving efficiency.


Bad example
Bad example
Avoid using too many colors or colors in large areas

Note: We suggest using no more than three colors in the user interface (except for within data charts and graphic illustrations)

Color contrast#

Good example
Good example
Bad example
Bad example
When the contrast is less than 3:1, it becomes difficult to read

Ant Design's color palette conforms to the WCAG 2.0 standard. The foreground and background colors should always meet the minimum standard of a 3:1 contrast ratio.