Sketch tutorial: How to color override text layers using layer styles — a dream coming true
A step by step guide by Helen Liebmann & DUYLAM
First we thought it’s a bug. Somehow suddenly the text layer changed color. What did we do? What were the last steps? After several attempts we managed to reproduce it and noticed — it’s THE feature!
Finally it’s possible to override the color of a text layer without outlining it. Follow this step by step guide to reduce your text style library to just one color and achieve the Holy Grail of an overrides panel. And no, we don’t use blending modes.
Here is the how to:
- Create color swatches as usual.
2. Turn all color swatches into layer styles.
3. Create a button shape (you could also use your prepared shape symbols in order to stay flexible with corner radius etc., but at this stage we’d like to keep it as simple as possible).
4. Apply a color to the rectangle using your prepared layer styles.
5. Create a text layer on top of your “button” layer and turn it into a text style. In our example we simply name the layer “text” because this is what we want to appear in our overrides panel later.
6. Place a rectangle above your text layer. Make sure to exactly cover the “button” layer underneath. As this will be the layer that tints our text we name it “text color”.
7. Apply a color using your prepared layer styles. In our example we use white, because we want our text to be white.
8. Select both layers (text color and text).
9. Create a mask by clicking the Mask icon.
10. Sketch automatically creates a new folder with the masked text layer inside.
11. Move the “button” layer into that folder.
12. Rename the folder to “Button” — this will be the name of our button symbol.
13. Sketch automatically changed the name of our text layer to “Mask”. Change it back to “text”.
14. We are ready to create our button symbol.
15. Your symbol layer structure should now look like this:
16. Insert a new instance of your button using the symbols menu.
17. Double check your overrides panel.
18. YAY! Happy color overriding!
Please let us know if this tutorial worked for you. We’d love to get your feedback. If you liked it, leave us a clap :)
Feel free to share!
Requirements: Sketch version 52.2
Authors: Helen Liebmann & DUYLAM