20 lines
605 B
TypeScript
20 lines
605 B
TypeScript
import chalk from 'chalk'
|
|
import colors, { pit, text, darkTeal, darkOrange, lightOrange, darkPurple } from './src/palette'
|
|
import Color from './src/helpers/color'
|
|
|
|
function log(color: Color) {
|
|
console.log(
|
|
chalk.hex(color.toHex()).bold('■ T'),
|
|
chalk.hex(text.toHex()).bold(color.name)
|
|
)
|
|
}
|
|
|
|
colors.forEach(log)
|
|
console.log(
|
|
chalk
|
|
.bgHex(pit.toHex())
|
|
.hex(text.toHex())
|
|
.visible(
|
|
`${chalk.hex(darkTeal.toHex()).visible('const')} ${chalk.hex(darkOrange.toHex()).visible('myFunc')} ${chalk.hex(lightOrange.toHex()).visible('=')} (isAwesome: boolean) => return 'yep'`
|
|
)
|
|
)
|