Comments (4)
@bwinton I tried to lay out how we could include alpha channels to the current color tokens. In the first proposal I open a new object that includes the hex
string and the opacity
array. This approach would allow future strings like meta
, category
, type
or other to be easily implemented.
"blue": {
"40": "#45a1ff",
"50": {
"hex": "#0a84ff",
"opacity": [30, 50, 70]
},
"60": "#0060df",
"70": "#003eaa",
"80": "#002275",
"90": "#000f40"
},
Alternatively a simpler solution would be to list everything in an array where the first value is the hex
and the remaining numbers are opacity values.
"blue": {
"40": "#45a1ff",
"50": ["#0a84ff", 30, 50, 70],
"60": "#0060df",
"70": "#003eaa",
"80": "#002275",
"90": "#000f40"
},
While I wait for a feedback from your side I will collect all the currently used opacity levels
from design-tokens.
Yeah, I was looking at https://github.com/salesforce-ux/theo#spec and kinda like the way they can add comments and descriptions and other stuff to each token, so I would vote for option A. π
Also, should we list 100% opacities? Do all colours always have a 100% opacity in addition to the more transparent versions?
from design-tokens.
Cool, thanks @bwinton for your swift feedback! I also prefer option one, being tokens so granular, it's nice to have some context there. As for now yes, all colors have a 100% opacity and I would assume that this will always be the case. As soon as I have all the different values used in product I will post them here.
from design-tokens.
What if we do something like this?
"grey": {
"10": {
"hex": "#f9f9fa"
},
"20": {
"hex": "#ededf0"
},
"30": {
"hex": "#d7d7db"
},
"40": {
"hex": "#b1b1b3"
},
"50": {
"hex": "#737373"
},
"60": {
"hex": "#4a4a4f"
},
"70": {
"hex": "#38383d"
},
"80": {
"hex": "#2a2a2e"
},
"90": {
"hex": "#0c0c0d",
"opacity": [10, 20, 30, 40, 50, 60, 70, 80, 90]
}
},
By having the hex
property always using the hexadecimal, we avoid too many exceptions - which should make the life of who is writing a script a bit easier. Plus, the .json
file is more readable.
from design-tokens.
Related Issues (19)
- Fira font package HOT 1
- Get our stuff working with the sass-module-importer. HOT 1
- Have CSS variables for more stuff HOT 2
- Are icons in message bars optional or required? HOT 1
- Size of buttons? HOT 1
- Ship photon-colors.css with Firefox HOT 3
- Update global readme with more useful content HOT 1
- Minor updates on GIMP color palette HOT 2
- Update colors readme HOT 1
- Add SASS vars to the package HOT 2
- Rename folders and files to photon-{something}
- Convert color tokens to xml for android applications
- How are we going to distribute the tokens to various projects? HOT 1
- There are no icons in the icons folders :( HOT 5
- There shouldn't be semi-colons in the iOS generated colour tokens. HOT 1
- Add Grey 10 a80 to colours.
- Close the repo
- Y|ah HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from design-tokens.