Currently, Sketch Color Variables are static. This means a single semantic token cannot resolve to different values depending on context (e.g., light vs dark mode or brand). As a result, we need to duplicate our DS or other libraries for other color modes, which creates maintenance overhead, increases the risk of inconsistency.
I’d like to request support for color/style/font variables similar to Figma. This is essential for building scalable design system and managing themes like dark/light or brand variants.
First thinks come to mind;
Variables that support multiple modes (Light, Dark, Brand, etc.)
Ability to switch modes at document or library level
Integration with existing Styles, Symbols, and Libraries
I know currently there are different ways to achieve this but as I said it creates maintenance overhead.
If you have other suggestions about this needs I’d like to know.
This feature suggested 2 years ago. You can merge this post or delete but please take this into consideration.
This is indeed one the most requested features and I know the team is actively thinking about how to make it a reality (along with other highly requested things).
I’ve also been working on a plugin to switch themes on the fly, without having to replace entire libraries or anything like that. Just define your color schemes in your Library and the plugin should take care of the rest (if your Color Variables have 1:1 pairings in dark, light, etc).
Here’s a quick video of it working, I’ve yet to polish some stuff but hope to release it soon-ish. It currently works on frames, and Symbol Instances (and any other selection that has Color Variables applied)
Wow thanks. Even I couldn’t run it expectedly at first try, now it works like magic (: We are currently doing some testing to see if this plugin can work within our own design system and design workflow.
I’ve another question. – So, in Sketch’s planned variable mode, all theme colors should be in the same file, right? If you could give us some preliminary information about this, we can adjust our system accordingly. Because currently, dark and light are in completely separate Sketch file.
We tried the plugin, it worked for Dark/Light conversion but it didn’t open the Switch to theme modal. We couldn’t use it for multiple libraries. Thanks for your effort.
Could you share a bit more about your setup? Would love to adjust the plugin so it picks up more color organization schemes and ends up working for you!
Do know that the Modal will only pop when the plugin finds multiple possible results for the swap. This gives the ability to select which ones you want to apply.
So the plugin searches the same Library file where the original Variables are in, for their alternatives.
For example:
If you have an element with Light/Background, Light/Accents/Red and Light/Card/SurfaceContainer
It will look for:
Dark/Background
Dark/Accents/Red
and Dark/Card/SurfaceContainer
All within the same Library file.
When working on the plugin, I tested having all the Color Variables (for both schemes) on the same document, since I was just working with color Variables and nothing else. For teams coming from Figma, this kind of translated a bit better since they just define the Light schema, then duplicate, rename to Dark and adjust the values and that’s it. The plugin takes care of the rest.
The plugin also works and performs nicely when working with more complex Libraries like the iOS one that has Library/Component/Light/Element type of structure, and the Material 3 Design Library as well.
I created a library with six colors which are grouped as doubles; dark, light, and third. Then I created two test symbols; first one has “dark surface” and “dark text” colors, the other one has “third surface” and “third text” colors. When I tried to switch theme of these symbols in a different file, the plugin switched the dark symbol to light without any modal. It gave an error for the third theme, “No themeable colors. Paths must contain Light or Dark.”
Hmm very interesting, in my tests I tested with different approaches:
Light
Dark
Colorblind
And it performed well in those tests, but I could’ve missed something. Could you share the Library (and the sample elements) so I can take it for a spin and see if I can update the plugin?