question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

💡 Proposal - colors tokens naming convention and migration

See original GitHub issue

In order to make our pallet scalable, we are thinking about the new approach to color tokens naming.

Currently we expose colors tokens in the following way (it’s the case in most of the cases, some exceptions are there, like colorsElements, where the naming is slightly different, but still similar):

'color-blue-dark': '#174E8C', 
'color-blue-base': '#2D64B3', 
'color-blue-mid': '#2E75D4', 
'color-blue-light': '#84B9F5', 
'color-blue-lightest': '#EDF4FC',

The upcoming update of the pallete would look like this for all the colors: Screenshot 2021-04-14 at 15 54 50 Based on that it would be maybe useful to migrate colors into slightly different naming convention.

Approach to the migration

Proposed tokens naming convention. We would have new tokens for GREY, BLUE, GREEN, RED, PURPLE, ORANGE, YELLOW in the following convention:

blue-900: #003297
blue-800: #00379F
blue-700: #0044AF
blue-600: #0059C8
blue-500: #036FE3
blue-400: #40A0FF
blue-300: #93CCFF
blue-200: #CBEDFF
blue-100: #DCF2FF

Colors Mapping for existing tokens and deprecation cases

  1. blue, green, purple, red, yellow will be mapped the same as blue. We could export both current colors with mapping and new color tokens, example for blue shades 👀 ➡️ https://gist.github.com/burakukula/73a3169063d5cee1c476127e1db2ddb8

  2. grey - we would expose additional, new tokens and colors-contrast, colors-elements, colors-text will be mapped with those new tokens, something like that 👀 ➡️
    https://gist.github.com/burakukula/1d038f1481af414a12a41e00844c0722 image

  3. Deprecate or remove coral, ice, mint and peach

  • 🔪 option 1: add deprecation note to those colors and map them to new shades from red, blue, green, and orange (@fabe maybe you could help out here). Remove those colors in v5.
  • 🔪 option 2: remove colors in v4 and add documentation for customers to which colors they should migrate they use those shades (we are using only colorIceMid - 3 times in the code - which we should migrate to other color anyway. We can do it even now, before the color migration).
  1. Maybe we should deprecate semantic colors - open question to @fabe @domarku and Daniel (I don’t know his GitHub profile 😬)

Proposed migration plan:

  1. Add new tokens and export both, old and new tokens
  2. Add deprecation note for old tokens and create migration documentation plan for customers
  3. Migrate tokens in our applications slowly (or hackathon style like last time 😁)
  4. Remove old tokens in v5

Open questions:

  • maybe we would be able to provide some sort of script to allow customers to migrate their tokens to new namespaces?
  • what should we do with colors that we would like to get rid of - coral, ice, mint, peach and semantic colors - remove now or depracate and remove in v5?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
domarkucommented, Apr 19, 2021

@denkristoffer

I’m not sure it’s a good idea for us to plan for v5 changes already That’s a good point!

@damann the token names are not going to contain hex values, that’s just the mapping

1reaction
domarkucommented, Apr 15, 2021

That sounds like a good plan!

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Practical Guide to Naming Design Tokens - UX Collective
Learn how to effectively name your design tokens in a systematic and future proof way. Understand all key concepts used today.
Read more >
Naming Tokens in Design Systems - Medium
Even simple design tokens exhibit naming patterns via levels. ... Tokens exist within a prototypical category like color , font , or space...
Read more >
Documenting Design Tokens | dbanksdesign - Danny Banks
I am specifically not writing about naming conventions, how to organize ... Sprout Social Seeds color token page showing all platform names.
Read more >
blade/2021-01-04-tokens-naming-convention.md at master
Design tokens are pieces of data that take the place of hard-coded properties. They are the consistent colors, fonts, sizing, and spacing that ......
Read more >
Create design tokens in XD - Adobe Support
Navigate to the Assets panel. Click + to view the colors and character styles. Double-click the default name for the asset and type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found