0.1.7 • Published 3 months ago
@lyra-theme/tokens v0.1.7
Lyra Color Tokens
This package is a color library for Lyra Theme, you can simply use it to access Lyra's colors and keep them in sync with the source via NPM.
Usage
To access Lyra colors, we recommend using named access, for example:
import lyra from "@lyra-theme/tokens"
// e.g. access normal blue color
const blue = lyra.normal.blue
// e.g. access bright green color
const green = lyra.bright.blue
// e.g. access ANSI normal red color
const ansiRed = lyra.ansi.normal.red
// e.g. access Ecosystem Background color
const background = lyra.eco.background
Otherwise, you can also use the token number to access, for example:
import lyra from "@lyra-theme/tokens"
// e.g. access Lyra 1 color
const blue = lyra.base.lyra1
// e.g. access ANSI 7 color
const ansiRed = lyra.ansi.base.ansi7
Note that Lyra Colors' numbering logic is the same as ANSI, and in the current version, they point to the exact same colors. The use of different keys is to make the distinction explicit and for possible future ANSI-specific modifications.
Made by Kawasaki Shizuku