You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been having an issue when attempting to build my color palette. I'm using hex color codes in my tokens.js file, and when I try to build, I get the following:
Error: Foreground and Background must be a valid CSS colour
It took me a while of adding and removing lines in my tokens.js and my package scripts to realize that the issue was when one of the colors' hex codes began with a 4. I tried several different formats of the same color, e.g. hsla or rgb works fine. It's only when the color code begins with 4.
Steps to reproduce, once the package is installed:
create a tokens.js file under ./source/_scss/colors
add a name/color pair where the color code begins with a 4, e.g. #40ffff
run npx a11y-color-tokens --outputDirPath='./source/_scss/colors --colorTokensPath='./source/_scss/colors/tokens.js'
I've been having an issue when attempting to build my color palette. I'm using hex color codes in my
tokens.js
file, and when I try to build, I get the following:Error: Foreground and Background must be a valid CSS colour
It took me a while of adding and removing lines in my
tokens.js
and my package scripts to realize that the issue was when one of the colors' hex codes began with a 4. I tried several different formats of the same color, e.g.hsla
orrgb
works fine. It's only when the color code begins with 4.Steps to reproduce, once the package is installed:
tokens.js
file under./source/_scss/colors
#40ffff
npx a11y-color-tokens --outputDirPath='./source/_scss/colors --colorTokensPath='./source/_scss/colors/tokens.js'
My
tokens.js
file is like this:The text was updated successfully, but these errors were encountered: