I’m a developer starting a side project and I’d like to learn more about app design. The last app I worked on with a designer he used Figma, which I found to be a complete nightmare from a developer point of view, so i’m giving sketch a try.
I’m already off to a bad start as i’m struggling massively to figure out how to manage variants of a design for both light and dark mode, which I thought would be a fairly built in thing. All the topics on this area seem to be pre color variables, and most link to plugins that are now deprecated. I thought I could simply create a bunch of color variables and give each a variant (like you do in Xcode) and then toggle the view mode variant, but thats not an option. Neither is creating 2 color variable groups and making sure everything is named the same inside.
I’ve seen 1 or 2 comments suggesting the approach is to make every single thing a custom symbol and duplicate them for light and dark mode. Then duplicate the entire app design and (manually???) toggle all the symbols to use the other variants. This seems madness to me.
How are people actually managing this? Are there any tutorials/templates using the most recent sketch version, or plugins still available?
Ok so some updates after a few hours. After poking around many forums I found a Reddit post that linked to this: Renaming and replacing Libraries · Sketch Which seems like exactly what I was looking for (Note: the SEO of these docs needs some attention, these are not being surfaced from google searches)
So i’m trying to make libraries one for Light mode and one for Dark mode, each only containing colours. I have hit several annoying aspects that i’ll detail below, but majorly I have an issue that I can not get the libraries to update. Even though everything is local on my machine, changes to the colours are or adding more items are not reflecting anywhere, either in settings or the document making use of it. No matter how many times I disable/re-enable, close/reopen app, etc. There seems to be no option to force an update
Here is a screenshot showing the “preview“ compared to the current doc. What am I doing wrong? (yes i’ve saved it)
Annoyances with this approach outside of this issue:
Unable to just create colour variables:
All I want to do is create 2 collections of colours, but I can’t just create colours on their own I have to create dummy objects so I can create/name them in place. This is cumbersome and a strange process I wasn’t expecting
Canvas colour:
While playing around I really wanted to set a canvas background as the default black is too dark. Was frustrated that this seems to be the only section that can’t use named colours. I want to use the same colour across all of them, which means copy pasting codes. In an environment where I’m building a reusable library of colours, this is strange
Having to use global app settings for a theme
The online doc describes how to use libraries, and replacing them, in order to build theming. Doing so through the app’s main settings, instead of something at a document level is cumbersome and odd. This is not an easy process to find/navigate
This really needs to be a more in-built feature, like one of the floating buttons for the components
Symbol colour grouping:
Since I have to create objects to name colours, I decided to create a colour palette screen (pretty much duplicating the colour variables screen). Doing so I’m playing with Symbols. It seems symbols will auto group colours that use same values without any obvious way to tell it to not too
Example: above is my Symbol which is a frame with a border, containing a frame with a fill colour, and a piece of text. I wanted to make this reusable so I could switch the fill colour and update the text across many instances. But because I used pure black for the placeholder fill, border, and text. When I went to use the symbol and change the fill colour, it changed all 3. So I had to go back and make them all slightly different to make them stand out
This worked fine, I added the symbol to the artboard and I was presented with 3 colour options to tweak for this instance. I tweaked the main fill colour to a new value, which happened to be the same value as the border. The symbol instance updated to merge these 2 colours together and had me locked into now only having 2 options for colours I could tweak. When I went to copy/paste the symbol instance on the artboard, they all now had the same border and fill colour, with no way to split them apart. Only allowing me to make the text colour unique
I resorted to having to create a bunch of named “lib-colour“ variables to use for the symbol definition, and make them off enough so that they don’t clash. Some of the name os these reuse words I’m using for named variables, meaning they show up in the search when trying to use the library, with no way to hide them
This was extremely painful for such a simple task and I now have a concern that I might accidentally use the same colour at some point in the future and break something
Dedicated Symbol document, but not for colours
When I created this Symbol it automatically created a new document called “Symbols“ where I could quickly view them. But this didn’t happen when I created colours. To view Colours I have to tap on “Components“ which initially defaults to showing the Symbols again. This feels inconsistent and strange
I’m also not a particular fan of the component’s screen forcing all the content on the left side to disappear. I’d prefer if the components was a tab rather than forcing the whole window to change
Personally I find the name “Symbol“ to be quite confusing for what it is, and again the SEO aspects of this seem to be quite poor
@alicetransit thank you for the info. Also thank you for showing me I can switch to view the color variable names from the picker instead of just the square colors ha!. This solves one of my issues of having similar colors only meant for the library itself. Now I can easily see which is which.
So how are you using these?
Are you also making everything a symbol and duplicating those too?
Do you have duplicate documents where you have all Light mode in one and Dark in the other?
Does your process handle a situation well where you have to make a change to a screen, you make the change once and it gets propagated to both light and dark and not have to copy/paste something 15 times across a dozen docs?
I’ve gotten some of it to work, but its very clunky and really not what I was hoping for
So I wasn’t using it fully locally, I was using the remote workspace. This does NOT work, it will not refresh or update. “Add Local Library“ also doesn’t do anything and just makes a system noise when you press it
Saving everything to mac, importing them as local duplicates, and then using them like that works somewhat better
They are now updating, and I can see new colours and updated colours reflecting in the colour picker. But these changes don’t reflect in the artboard. I have to replace the library and replace it back to get it to update.
This is fairly annoying, but the process does work (ignore the ugly app)
<i’m only allowed to add 1 embedded image per post so see the 2 images as replies below>
More annoying aspects:
The menu for replacing libraries doesn’t remember your selections, it always defaults to two system libraries instead, forcing you to go find the ones you want, potentially in a very long list. If this is intended to be how people “theme“ then it really needs some smarts to default to the reverse of what you last used, so people can quickly switch back and forth. As well as grouping your own and system ones seperately
I really need a “workspace“ file like what VS code has. I now have duplicates of my libraries, I need to import the local ones when reopening sketch. Its annoying to try find the local ones as I don’t know which colour file icon means which. I really need to be able to just save a record of all the files i’m using together, and be able to open all from one click. I have no idea how I would share this with someone else otherwise
Through all this back and forth I accidentally marked my current project as a library, and now its showing up in the library menu as an option. There seems to be no way to reverse this, so its removed from the list
What is needed instead:
A “+“ button in the colour variables screen so I can create them there directly
We already have the ability to create groups of colours, this should be the starting point of a theme. Short term build a quick feature that allows you manually create 2 groups and manually ensure both have exactly the same names.
Add a simple dropdown on the artboard, doing the same thing that replacing a library does under the hood
Longer term, have a “smart group“ called a theme where you can create 2 or more that are linked and always display the same items. Add one to a group, it automatically duplicates it to the second and you need only tweak the colour
After seeing the Sketch team announce liquid glass support on day one, and how long ago iOS added Light/Dark mode, AND all the pieces all ready in place that could be cobbled together fairly quickly. I’m quite shocked this hasn’t already been done, and the library approach is whats being recommended. Light/Dark mode is such an important part of iOS/iPad/Mac design, and the current approach is EXTREMELY flaky and annoying