Tokens Studio for Figma
  • Getting Started
    • Tokens Studio Plugin for Figma
    • Install the Figma Plugin
    • Pro Licence for the Figma Plugin
    • Join the Slack Community
    • Feature Requests - Featurebase
    • Changelog - Featurebase
  • Design Token Fundamentals
    • Intro to Design Tokens
      • Token Anatomy - Type
      • Token Anatomy - Value
      • Token Anatomy - Description
      • Token Anatomy - Name
  • Token Management
    • Token Types
      • Asset
      • Boolean
      • Border - Composite
      • Box Shadow - Composite
      • Color
        • Modified Colors (pro)
        • Gradient Colors
      • Dimension
        • Border Radius
        • Border Width
        • Sizing
        • Spacing
      • Number
      • Opacity
      • Other
      • Text (string)
      • Typography - Composite
        • Font Family
        • Font Weight
        • Font Fallbacks
        • Font Size
        • Line Height
        • Letter Spacing
        • Paragraph Indent
        • Paragraph Spacing
        • Text Case
        • Text Decoration
      • Composition (legacy)
    • Token Values
      • Token Values with References
      • Using Math in Token Values
    • Token Names
      • Token Name Technical Specs
      • Token Groups
      • Edit Token Names
    • Token Description
    • Token Sets
      • JSON View
  • Themes management
    • Themes (pro)
    • Themes that switch
  • Working in Figma
    • Variables and Tokens Studio
    • Styles and Tokens Studio
    • Export to Figma Guide
      • Export Options
      • Export Using Themes (pro)
      • Export Using Token Sets
      • Variables Skipped on Export
      • Styles with Variable References
    • Import from Figma Guide
      • Import Styles from Figma
      • Import Variables from Figma
        • Connect Themes to Imported Variables
        • Imported Variable Types and Token Types
    • Non-local Variables and Styles (pro)
    • Remove Tokens from Figma elements
    • Dev Mode in Figma
  • Settings Management
    • Plugin Settings
    • Base Font Size Setting
    • Token Format - W3C DTCG vs Legacy
  • Token Storage and Sync Integrations
    • Local Document - Figma File Token Storage
      • Figma Data Limits
    • Remote Token Storage Integrations
      • GitHub - Git Sync Provider
      • GitLab - Git Sync Provider
      • Bitbucket - Git Sync Provider
      • Azure DevOps - Git Sync Provider
      • JSONBin - Cloud Sync Provider
      • Supernova - Cloud Sync Provider
      • Tokens Studio Platform - Cloud Sync Provider
      • URL - Server Sync Provider
      • Generic Versioned Storage - Server Sync Provider
    • Multi-file Sync to Remote Storage (pro)
    • Manage Sync Providers
      • Edit Sync Provider
      • Change Active Sync Provider
      • Remove Sync Provider
    • Sync Changes to Remote Storage - Push and Pull
    • Branch Switching (pro) - Version Control
  • Inspect and Debug Tokens
    • Inspect Tokens
    • Remap Tokens
  • Transform Tokens for Development
    • Style Dictionary + SD Transforms
    • Official docs for Style Dictionary
  • Style Dictionary Playground
  • Troubleshooting
    • Reset Tokens from Dev Console
    • Tokens Studio Status
  • Open Source
    • Contribute
    • Shared Plugin Data
Powered by GitBook
On this page
  • Modified Colors
  • How to use color modifiers
  • Available modifiers
  • Limitations of modified colors
  • W3C DTCG Token Format
  • Transforming Tokens
  • Resources

Was this helpful?

Edit on GitHub
Export as PDF
PreviousColorNextGradient Colors

Last updated 5 months ago

Was this helpful?

Modified Colors

Color Modifiers allow you to easily create consistent, scalable color systems by adjusting and blending colors with fine-grained control within Tokens Studio.

Modifying your Color Tokens is a powerful way to create dynamic color schemes.

For example:

  • Generate a color ramp from a single 'base color'.

  • Introduce subtle variations between interactive states.


How to use color modifiers

In the Color Token form, define your Token Name and assign the Token Value by referencing another Color Token.

The Token you've referenced is known as the base color in the rest of this guide.

Select the Add new modifier button on the right side of the Modify label.

  • Choose your desired color space:

    • LCH

    • SRGB

    • P3

    • HSL

  • Choose your desired modifier

  • Define the modification amount by entering in a number between 0 and 1 based on your desired effect.

  • Be sure to Save your new modified Color Token

Modify via Color Picker

You can also use the Color Modifier (pro feature) with the Color Picker tool in the plugin by Selecting the color swatch to the left of the Token Value Input.


Available modifiers

The plugin currently supports four popular types of modifications to Color Tokens.

Modifier
Description

Increases the lightness (luminosity) of the base color by your chosen value.

Reduces the lightness (luminosity) of the base color by your chosen value.

Adjusts the opacity of the base color by your chosen value, often reducing it to make the color more transparent.

Combines your base color with another color, allowing you to control the proportion of each color in the mix.

Lighten

The lighten modifier increased the lightness (luminosity) of the base color by defining a numeric value that represents a percentage of adjustment.

  • 0 = no change in lightness (0%)

  • 0.5 = 50% increased lightness

  • 1 = 100% increased lightness,

    • which significantly increases the lightness but does not necessarily make the color white.

    • The maximum lightness is usually capped to maintain the integrity of the color's hue and saturation.

Darken

The darken modifier reduces the lightness (luminosity) of the base color by defining a numeric value that represents a percentage of adjustments.

  • 0 = no change in lightness (0%)

  • 0.5 = 50% reduced lightness

  • 1 = 100% reduced lightness,

    • which significantly darkens the color, but does not necessarily make the color black.

    • The maximum darkness is usually capped to maintain the integrity of the color's hue and saturation.

Alpha

The alpha modifier adjusts the opacity of the base color by defining a numeric value that represents a percentage of adjustment for fine-grained control of transparency.

  • 0 = fully transparent (0%), making the color invisible

  • 0.5 = 50% opacity, making the color semi-transparent

  • 1 = full opacity (100%), the color appears 'solid'

Mix

The mix modifier combines the base color with another color token by defining a numeric value that represents the proportion of the mix for fine-grained control over the balance between the two colors.

  • 0 = only the base color (0% of the mixed color)

  • 0.5 = an equal mix of both colors (50% base color, 50% mixed color)

  • 1 = only the mixed color (100% of the mixed color)


Limitations of modified colors

There are some known limitations with Modified Color Tokens.

Exporting to Figma as Variables looses references

Figma Variables does not support Modified Colors, as they aren't able to resolve the value of these sorts of 'dynamic references'.

The plugin will Export your Modified Color Tokens as Color Variables which will show their Resolved Values in hex codes, which Figma can support. Changes you make to these Tokens in the plugin will also update to the connected Variable when you Export your changes.


W3C DTCG Token Format

Today, we have to resolve your Modified Colors into Hex when Exporting to Figma, and to align with the current definition of Color Tokens in the W3C DTCG specification.


Transforming Tokens

When transforming Color Tokens that have been modified, there are specific configurations to be aware of.

SD-Transforms generic package includes a specific transform to convert Tokens Studio modified colors to their resolved color values.

You can add an optional transform to convert Tokens Studio modified colors to a specific format, for example e.g. hsl which will ensure that the resolved color value will be formatted as the resolved value in HSL.

There's also a global option which allows you to set the color format once for all colors that have a modifier, so you don't have to set this for every token individually.


Resources

Tokens Studio uses the ColorJS.io library for the implementation of modified colors.

Mentioned in this doc:

Figma resources:

CSS resources:

Community resources:

Known issues and bugs

    • HSLA calculated color values are incorrect

    • Choosing HSLA in the color picker converts the Token to RGBA

    • Unexpected results when renaming borderRadius Tokens

Requests, roadmap and changelog

Color is an official token type in the W3C DTCG specifications () which is currently being updated to define expanded support for additional color spaces.

→

SD-Transforms -

Style Dictionary -

Design Tokens Community Group -

Design Tokens Community Group -

Design in Figma -

MDN Web Docs -

MDN Web Docs -

A written guide by Katie Cooper, Lead Product Designer -

Tokens Studio Plugin GitHub -

Color Transforms

HSLA

Color modifiers break when borderRadius Token is renamed

Modified colors aren't showing up in the second screen feature as expected -

8.1 Color
→ We'd love to hear your thoughts on this! Join the conversation on Featurebase.
SD-Transforms Read-Me doc, ts/color/modifiers
→ SD-Transforms Read-Me doc, options
https://colorjs.io/docs/
Read Me
https://styledictionary.com/
W3C Draft
8.1 Color
Manage color profiles in Figma
Color Space Glossary
Color Gamut
Creating a color ramp using color modifiers in Tokens Studio
Open issues for Token Type Color Modifiers
#2946
#2945
#2668
Community Post
↓ More details below
Lighten
Darken
Alpha
Mix
Creating a new Modified Color Token in the Tokens Studio Plugin for Figma.
With a Color Token form open, selecting the swatch to the left of the Value input opens the color picker in the Plugin. Select the + icon next to the Modify label to use the Color Modifier feature.
Page cover image

🐞 If you are experiencing an issue not listed here, please reach out to us on the Troubleshooting channel of our , , or send us an email support@tokens.studio

💌 Visit to contribute or subscribe to updates.

💡 Something to share?

community Slack
submit it on our feedback tool
Submit it here!

Engineers typically transform Tokens used in code with , which is tool-agnostic. Tokens coming from Tokens Studio require an additional step: , an npm package that prepares Tokens for Style Dictionary.

https://feedback.tokens.studio/
Style Dictionary
@Tokens-studio/sd-transforms

Jump to the guide on Exporting Tokens to Figma by selecting the card below to learn more.

Export to Figma Guide