CColorWell
Get ColorWell

ColorWell/Guides

How to Add Color Styles in Figma Efficiently

Learn to add color styles in Figma by generating harmonized palettes and exporting ready-to-use tokens directly from ColorWell.

October 21, 2026 · 5 min read

Adding color styles in Figma means creating named tokens that apply consistently across your design file. You generate these tokens by defining a base color, creating harmonized variations, and exporting them as structured data that Figma can import directly into its styles panel. This process ensures every component uses the same hex values without manual re-entry.

Why Manual Color Selection Fails

Manually picking hex codes for every button, background, and text element leads to inconsistent shades and accessibility errors. A designer might use #4F46E5 for primary buttons but accidentally select #4F45E6 for secondary elements because of slight rendering differences or eye fatigue. Without a centralized style system, these minor discrepancies accumulate, making the interface look unpolished and requiring time-consuming cleanup later.

Using predefined styles solves this by locking specific hex values to semantic names like primary-500 or text-inverse. When you update the style definition, every instance updates automatically. This consistency is critical for handoff to developers, who rely on exact hex matches rather than approximate visual matches.

Generating a Harmonized Palette

Start with your brand’s primary color. For this guide, we use #4F46E5, a vivid indigo. From this base, you need a complementary palette that includes lighter backgrounds, darker hover states, and neutral grays. Instead of guessing these shades, use a method that maintains hue consistency while adjusting lightness and saturation.

A reliable approach uses perceptual color spaces like Oklch. This ensures that when you lighten #4F46E5, it doesn’t turn pale yellow or gray but stays a true lighter indigo. You need three main variations:

Using ColorWell, you drop in the base hex #4F46E5. The tool generates analogous and monochromatic schemes that keep the hue stable. For this example, let’s derive a hover state and a background tint. A good hover state is noticeably darker than the base to provide clear interactive feedback. A background tint should be significantly lighter to create separation without introducing a gray cast.

Here is the resulting palette derived from #4F46E5:

{
  "primary": "#4F46E5",
  "primary-hover": "#4338CA",
  "background-light": "#EEF2FF",
  "text-primary": "#1E1B4B"
}

These values are chosen to maintain contrast and visual harmony. #4338CA provides clear feedback against #4F46E5 without changing the color family. #EEF2FF offers a subtle separation from white without introducing a gray cast.

Verifying Accessibility with WCAG Checks

Color harmony does not guarantee readability. You must verify that text placed on these backgrounds meets WCAG AA standards. This involves checking the contrast ratio between foreground text and background surfaces.

For the palette above, check these pairs:

  1. Primary Button Text: White (#FFFFFF) on Primary (#4F46E5).
  2. Body Text: Dark Indigo (#1E1B4B) on Light Background (#EEF2FF).
  3. Secondary Text: Gray (#6B7280) on White (#FFFFFF).

The contrast ratio for white text on #4F46E5 is approximately 6.3:1, which passes AA for normal text (requires 4.5:1). If you used a lighter shade like #818CF8, white text would fail AA. This is why systematic generation matters: it prevents accidental low-contrast combinations.

When verifying, ensure large text (above 18pt or bold above 14pt) meets the 3:1 ratio, while normal text meets 4.5:1. If your brand color is too light for white text, darken it slightly until the ratio passes. Do not compromise contrast for aesthetic preference; usability is non-negotiable.

Exporting Tokens for Figma Styles

Once your palette is verified, format it for import. Figma accepts JSON tokens directly into its styles panel. This saves you from manually creating each style.

Prepare your tokens as a flat JSON object. Each key becomes a style name, and each value becomes the hex code. Ensure the hex codes are uppercase for consistency, though Figma handles lowercase equally well.

Here is the exact JSON structure to copy:

{
  "primary": "#4F46E5",
  "primary-hover": "#4338CA",
  "background-light": "#EEF2FF",
  "text-primary": "#1E1B4B",
  "text-secondary": "#6B7280",
  "border-default": "#E5E7EB"
}

This structure maps directly to Figma’s style naming convention. The slashes in keys like primary/hover become part of the style name, allowing for organized grouping in the styles panel. If you use ColorWell, you can generate this JSON automatically. The tool exports ready-to-paste tokens that include these verified contrast pairs. This eliminates the need to manually calculate hex values for hover states or disabled states.

Applying Styles in Your Design File

Importing these tokens into Figma is straightforward. Open your Figma file and navigate to the right sidebar. Click on the "Styles" tab. Ensure you are in the "Color" section. Click the "+" button to add a new style.

For each entry in your JSON, create a corresponding style:

  1. Click "+".
  2. Name it exactly as the JSON key (e.g., primary).
  3. Set the hex value to match the JSON value (e.g., #4F46E5).
  4. Repeat for primary-hover, background-light, etc.

Alternatively, if you have many tokens, use a plugin that supports JSON import. Many teams use scripts to batch-import these values. However, for small palettes (under 20 tokens), manual entry is fast and ensures you review each color’s purpose.

Once created, apply styles to components. Select a button rectangle and apply the primary fill style. Select the text inside and apply the text-inverse style (if you added one). When you later decide to adjust the brand color from #4F46E5 to #4338CA, you edit the primary style definition once. Every button using that style updates instantly.

This workflow reduces decision fatigue. Designers no longer choose colors from scratch; they select semantic tokens. Developers receive exact hex codes from the style definitions, ensuring code matches design. Consistency becomes automatic rather than manual.

Common Pitfalls and Fixes

Even with a solid system, issues arise. Here are frequent problems and solutions.

Problem: Styles disappear after import. Ensure you are in the correct file scope. Styles created in a component library file must be published to be visible in other files. If working in a single file, verify you clicked "Save" or that the file synced correctly.

Problem: Hover states look too similar. If your hover color is too close to the base, users won’t perceive interaction. Increase the lightness difference. For #4F46E5, #4338CA is distinct. If you used #4F46E4, it would be invisible. Check contrast ratios for both states against their backgrounds.

Problem: Text looks muddy on tinted backgrounds. Avoid using mid-tone grays on colored backgrounds. Use dark, saturated text (#1E1B4B) on light tints (#EEF2FF). Do not use #6B7280 on #EEF2FF unless it passes AA. Test this combination specifically. If it fails, darken the text or lighten the background further.

Using named tokens like primary-hover instead of hex codes helps team members understand intent. When a designer sees background-light, they know it’s for section backgrounds, not cards. This semantic naming reduces misapplication.

By following this structured approach—generate harmonized colors, verify contrast, export JSON tokens, and apply them as named styles—you create a resilient design system. This method scales from single-page sites to complex applications without losing consistency.

Do it in ColorWell

Everything in this guide works in the browser — open the tool and try it on your own input.

Open ColorWell →

Questions people also ask

Do ColorWell exports support dark mode?

Yes, ColorWell generates harmonized palettes that include specific light and dark variants suitable for dark mode interfaces. It ensures contrast ratios remain compliant across both themes by adjusting lightness values in the Oklch color space.

Can I edit the exported tokens after pasting?

Yes, you can edit the JSON structure or individual hex values directly in a text editor before importing them into Figma. This allows you to fine-tune specific shades or add custom naming conventions without relying solely on the generator's output.

More guides