@golfed/color

1.0.1 • Public • Published

@golfed/color

Bundlephobia

Possibly the tiniest color library ever. 42 styles in barely 146 bytes of minified, gzipped, golfed, no dependency code.

import color from '@golfed/color';

console.log(color(`
Hello, world!
{r}This is red!
{g}This is green!
{b}This is blue!
{/}Reset!
`.trim()))

Supported styles

  • k: black
  • r: red
  • g: green
  • y: yellow
  • b: blue
  • m: magenta
  • c: cyan
  • w: white
  • kb: background black
  • rb: background red
  • gb: background green
  • yb: background yellow
  • bb: background blue
  • mb: background magenta
  • cb: background cyan
  • wb: background white
  • ki: intense black
  • ri: intense red
  • gi: intense green
  • yi: intense yellow
  • bi: intense blue
  • mi: intense magenta
  • ci: intense cyan
  • wi: intense white
  • kbi: intense background black
  • rbi: intense background red
  • gbi: intense background green
  • ybi: intense background yellow
  • bbi: intense background blue
  • mbi: intense background magenta
  • cbi: intense background cyan
  • wbi: intense background white
  • /: reset
  • *: bold
  • _: italic
  • #: dim
  • =: underline
  • !: blink
  • ^: inverse
  • -: hidden
  • ~: strikethrough

Readme

Keywords

none

Package Sidebar

Install

npm i @golfed/color

Weekly Downloads

0

Version

1.0.1

License

GPL-3.0

Unpacked Size

1.8 kB

Total Files

3

Last publish

Collaborators

  • siddharthshyniben