@buzuli/color
Advanced tools
Comparing version 1.1.2 to 1.2.0
@@ -9,2 +9,4 @@ | ||
const black = hex('000') | ||
console.log(red('rojo')) | ||
@@ -18,5 +20,16 @@ console.log(orange('naraja')) | ||
console.log(key('orange')('My favorite color')) | ||
console.log(hex('abc')('Surprise me.')) | ||
console.log(red.bg(black('rojo'))) | ||
console.log(orange.bg(black('naraja'))) | ||
console.log(yellow.bg(black('amarillo'))) | ||
console.log(green.bg(black('verde'))) | ||
console.log(blue.bg(black('azul'))) | ||
console.log(purple.bg(black('púrpura'))) | ||
console.log(gray.bg(black('gris'))) | ||
console.log(key('orange').bold('My favorite color')) | ||
console.log(hex('abc').bold('Surprise me.')) | ||
console.log(key('orange').bg(black.bold('My favorite color'))) | ||
console.log(hex('abc').bg(black.bold('Surprise me.'))) | ||
console.log(green(emoji.inject(':umbrella: spring :tulip:'))) | ||
@@ -27,1 +40,4 @@ console.log(yellow(emoji.inject(':palm_tree: summer :sunny:'))) | ||
console.log(emoji.key('x')) | ||
console.log(emoji.key('white_check_mark')) | ||
const chalk = require('chalk') | ||
const emoji = require('./emoji') | ||
const key = name => chalk.keyword(name) | ||
const hex = code => chalk.hex(code) | ||
function hex (code) { | ||
const color = chalk.hex(code) | ||
color.bg = chalk.bgHex(code) | ||
return color | ||
} | ||
function key (name) { | ||
const color = chalk.keyword(name) | ||
color.bg = chalk.bgKeyword(name) | ||
return color | ||
} | ||
module.exports = { | ||
@@ -8,0 +17,0 @@ red: hex('d43'), |
{ | ||
"name": "@buzuli/color", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "Preferred colors for @buzuli's projects", | ||
@@ -5,0 +5,0 @@ "main": "lib/color.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3481
62