Material Design design token json palette converter from Figma to TailWindCss
make install-tools
- Install optional tools:jq
,ncu
,markdown-toc
npm run launch:loc
- Run development server with types watchnpm run build
- Buildprod
filesnpm run build:loc
- Builddevelopment
/local
filesmake build-docker
- Buildtuiteraz/jaba-static
based docker to serve/dist
filesmake up-docker
- Startjaba
container on theSERVE_PORT
forstatics
testingmake down-docker
- Startjaba
container
Also one can check Makefile
for more details on automation commands.
- Open M3D Palette Kit in Figma (link)
- Open or install "Material Theme Builder" plugin (link)
- In plugin select your colors for the theme "M3". Click "Apply" for every selected color.
- When theme update completed, click "Export" -> "Theme.json". Save "material-theme.zip". Unzip it.
- Drop theme.json to mdpal browser window.
- Generated tokens file will be downloaded for local use
- Use mdtex tool to explore palette and tokens.
- Converts color codes to TW standard format:
ref.primary.primary95
->ref.palette.primary50
ref.primary.primary90
->ref.palette.primary100
- Fixes the token color reference to proper palette color code according to Figma tmpl
- Root
tsconfig.json
used for IDE..configs/tsconfig.2022.json
for build time by Webpack. So they partially overlaps.
- resolve typecheck errors
- switch to
shebang
routes - for opacity option use `rgba()`` instead of only color code