color takes four kinds of value, and they are not interchangeable.
- The five status names (success, processing, error, warning, default). Keep them for state, matching every Alert, Badge and Result on the page.
- antd's presets (blue, green, gold and the rest). They mean nothing until you give them a meaning, and that meaning has to hold across the product.
- Palette names work like presets. A palette from your theme (the default theme adds amber, emerald, teal, sky, indigo, violet, fuchsia, rose and grays like slate and zinc) works with every variant and in dark mode.
- A hex color does not follow the theme. color="#f50" derives the fill from that one color, the same in light and dark mode. When the color belongs to your brand, add it to the theme as a palette.
Give each color one meaning, everywhere. Pick the color from the value (a fixed map, or a hash of the label), so the same label has the same color on every screen.
- Do not use a status color for a category. A red “Marketing” tag reads as a failure.
- Use as few colors as the screen needs. When every tag is a different color, color stops saying anything.
- Never let color carry the meaning alone. The word has to say it too. See the Accessibility tab.
- color="blue-inverse" and its siblings are deprecated and warn. Use variant="solid".