Create your own Design system: Chapter Color tokens

Sangeeth kumar
UX Planet
Published in
7 min readOct 6, 2023

--

Hey ! Thanks for all responses. I’m grateful

If you are liking this and want to read previous chapters of Create Your Own Design System, Click here

Stay connect for future articles

Color tokens are a type of design token that represents colors. They are typically used in design systems to make it easier to manage and reuse colors across different projects. Color tokens are typically more concise than hex codes or color styles, and they can be used to represent colors in different formats, such as CSS, HTML, and SVG.

Color tokens are often used in conjunction with theme tokens. These tokens allow you to change the look and feel of your design system by changing the values of the color tokens. For example, you could have a theme token for the light mode color palette and a theme token for the dark mode color palette. By changing the values of these theme tokens, you can change the colors of your design system from light mode to dark mode.

Color tokens are a powerful tool for managing and reusing colors in design systems. They are concise, easy to use, and can be used in different formats. If you are working on a design system, I recommend using color tokens to represent your colors.

Here are some of the benefits of using color tokens in design systems:

Consistency

Color tokens can help to ensure that colors are used consistently across different parts of the design system. This is important for creating a cohesive and unified look and feel.

Reusability

Color tokens can be reused across different projects and components. This saves time and effort, and it helps to ensure that colors are used correctly.

Maintenance

Color tokens can be easily updated and managed. This makes it easy to change the colors of the design system without having to update every individual component.

Extensibility

Color tokens can be extended to support new colors and color palettes. This makes it easy to adapt the design system to different needs and requirements.

If you are looking for a way to manage and reuse colors in your design system, I recommend using color tokens. They are a powerful tool that can help you to create a consistent, reusable, and maintainable design system.

How to set color tokens

Setting color tokens in a design system involves defining and organising a consistent set of colors that will be used across your design projects. Here are the steps to set color tokens effectively:

1. Define Your Color Palette

Start by determining the core colors that will make up your design system. These colors should align with your brand’s identity and design principles. Common colors include primary, secondary, accent, background, text, and error/success feedback colors.

Which we discussed on the previous chapter : Check it out here

2. Assign Meaningful Names

Give each color a clear and descriptive name that reflects its purpose. For example, instead of “Blue,” use “Primary Button Color” or “Header Text Color.” Meaningful names help designers and developers understand when and where to use each color.

3. Organize Variants

If your design system includes variants of colors (e.g., light and dark themes or different shades of a primary color), create separate tokens for each variant. This ensures consistency while allowing flexibility in design.

4. Document Color Tokens

Document the color tokens in a centralized location within your design system documentation. Include information such as color codes (e.g., hex, RGB), names, and usage guidelines for each color token.

5. Accessibility Considerations

Ensure that your color tokens meet accessibility standards. Check that text has sufficient contrast against background colors to maintain readability for all users, including those with visual impairments.

6. Testing and Feedback

Test your color tokens in various design mockups and prototypes to ensure they work well in real-world scenarios. Collect feedback from designers, developers, and stakeholders to refine your color choices if necessary.

7. Version Control

Implement a version control system for your design system, especially if it evolves over time. This ensures that everyone is using the same version of color tokens and that updates are managed effectively.

8. Integration with Design Tools

Consider using design tools that support the use of design tokens. Some design software and plugins allow you to define and manage tokens, making it easier to apply them consistently across your design files.

9. Collaboration and Communication

Educate your design and development teams about the use of color tokens. Establish clear communication channels to address questions and ensure that everyone is aligned with the design system’s color guidelines.

10. Update and Maintain

Regularly review and update your color tokens as your design system evolves or your brand’s identity changes. Ensure that the documentation is kept up-to-date.

By following these steps, you can effectively set and manage color tokens within your design system, promoting consistency and coherence in your design projects.

Example list of color tokens

  1. PrimaryColor: Main brand color used for key elements and highlights.
  2. SecondaryColor: Secondary brand color for complementary accents.
  3. AccentColor: Vibrant color for attention-grabbing elements.
  4. BackgroundLight: Light background color for sections.
  5. BackgroundDark: Dark background color for contrast or depth.
  6. TextPrimary: Main text color for readability.
  7. TextSecondary: Secondary text color for subtler content.
  8. LinkColor: Color for hyperlinks and interactive elements.
  9. ErrorColor: Color for error messages or alerts.
  10. SuccessColor: Color for success messages or positive feedback.
  11. WarningColor: Color for warning messages or cautionary prompts.
  12. NeutralColor: Neutral color for borders, dividers, or minor accents.
  13. HighlightColor: Color for selected or focused elements.
  14. DisabledColor: Color for disabled or inactive elements.
  15. OverlayColor: Color for overlays or modals.
  16. GradientPrimary: Primary color for gradient backgrounds.
  17. GradientSecondary: Secondary color for gradient backgrounds.
  18. ShadowColor: Color for shadows or box shadows.
  19. MutedColor: Subdued color for subtle design elements.
  20. BackgroundOverlay: Color for semi-transparent backgrounds.
  21. TextOverlay: Text color for overlay content.

Figma Variables

To create a variable in Figma, click the + Create variable button in the Variables panel. Then, select the type of variable you want to create and give it a name and value.

Once you have created a variable, you can use it to set the value of any design property. To do this, simply select the property you want to set and then type the name of the variable in the Value field.

Variables can also be used in prototyping. For example, you could use a variable to control the state of a button based on the user’s interaction. To do this, simply create a prototype interaction that sets the value of the variable. (Will see about it on a new article)

Here are some tips for using Figma variables for color tokens:

  • Use descriptive names for your color tokens. This will make it easier for you and your team to understand what each token represents.
  • Organize your color tokens into groups. For example, you could have groups for primary colors, secondary colors, text colors, and background colors.
  • Use color tokens throughout your designs. This will help to ensure that your designs are consistent and easy to update.
  • Use color tokens in your prototypes. This will allow you to create more dynamic and realistic prototypes.

Here are some examples of how you can use Figma variables for color tokens:

  • Create a Primary Color variable for your brand color and use it to set the color of your logo, buttons, and other important elements.
  • Create a Secondary Color variable for a complementary color that you can use to create accents and highlights in your designs.
  • Create a Text Color variable for the primary text color in your designs.
  • Create a Background Color variable for the primary background color in your designs.

Using Figma variables for color tokens is a great way to create more consistent, efficient, and flexible designs.

And that’s a wrap! Piqued your interest? Just holler!

Twitter | LinkedIn | Let’s Chat

--

--