https://github.com/jeff-hykin/vibrance
💾 📦 ✅
https://github.com/jeff-hykin/vibrance
browser color colors console deno javascript nodejs
Last synced: 3 months ago
JSON representation
💾 📦 ✅
- Host: GitHub
- URL: https://github.com/jeff-hykin/vibrance
- Owner: jeff-hykin
- Created: 2021-12-12T22:30:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-25T17:56:48.000Z (over 4 years ago)
- Last Synced: 2025-02-23T02:36:10.586Z (over 1 year ago)
- Topics: browser, color, colors, console, deno, javascript, nodejs
- Language: Shell
- Homepage:
- Size: 3.14 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vibrance
A CLI colorizing tool, use it in Deno, Node.js or the browser console (no npm install required!)
Built as a fork off of Chalk.js
#### Browser or Deno
```js
const { console, vibrance } = (await import('https://cdn.skypack.dev/vibrance@v0.1.35')).default
console.red("Howdy!") // has console.log() and all the other methods (debug/warn/error/group/etc)
console.blue.underline("Howdy!")
console.green.bgBlack("Howdy!")
// NOTE!: this doesnt work: console.green("Hello").blue(" world")
// alternative way
vibrance.blue("Howdy! ").green("this will be logged").log() // NOTE: needs log at the end!
// a dont-import-console way of using vibrancy
console.log(vibrance.blue("This will ").bold.magenta("also").blue(" be logged"))
```
#### Node.js
`npm install vibrance`
```js
const { console, vibrance } = require("vibrance")
console.red("Howdy!")
console.blue.underline("Howdy!")
console.green.bgBlack("Howdy!")
```
## Demo
### Deno.js console

### Firefox console

## API
- All the methods can be chained
- All work on both `console` and `vibrance`
```js
// colors
vibrance.black("Howdy!")
vibrance.red("Howdy!")
vibrance.green("Howdy!")
vibrance.yellow("Howdy!")
vibrance.blue("Howdy!")
vibrance.magenta("Howdy!")
vibrance.cyan("Howdy!")
vibrance.white("Howdy!")
vibrance.blackBright("Howdy!")
vibrance.gray("Howdy!")
vibrance.grey("Howdy!")
vibrance.redBright("Howdy!")
vibrance.greenBright("Howdy!")
vibrance.yellowBright("Howdy!")
vibrance.blueBright("Howdy!")
vibrance.magentaBright("Howdy!")
vibrance.cyanBright("Howdy!")
vibrance.whiteBright("Howdy!")
// background colors
vibrance.bgBlack("Howdy!")
vibrance.bgRed("Howdy!")
vibrance.bgGreen("Howdy!")
vibrance.bgYellow("Howdy!")
vibrance.bgBlue("Howdy!")
vibrance.bgMagenta("Howdy!")
vibrance.bgCyan("Howdy!")
vibrance.bgWhite("Howdy!")
vibrance.bgBlackBright("Howdy!")
vibrance.bgGray("Howdy!")
vibrance.bgGrey("Howdy!")
vibrance.bgRedBright("Howdy!")
vibrance.bgGreenBright("Howdy!")
vibrance.bgYellowBright("Howdy!")
vibrance.bgBlueBright("Howdy!")
vibrance.bgMagentaBright("Howdy!")
vibrance.bgCyanBright("Howdy!")
vibrance.bgWhiteBright("Howdy!")
// specials
vibrance.reset()
vibrance.bold()
vibrance.dim()
vibrance.italic()
vibrance.underline()
vibrance.inverse()
vibrance.hidden()
vibrance.strikethrough()
vibrance.visible()
```