0.0.6 • Published 6 years ago

colors-md v0.0.6

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
6 years ago

Description

A NodeJS module that returns terminal escape codes for styling strings. Colors-md can convert to ansi8 and ansi256 color codes. Currently accepts hex and rgb color input strings.

Installation

Local
[sudo] npm install --save colors-md
Global
[sudo] npm install --global colors-md

Usage

Color Format Specification

Hex
  • '#ffffff'
  • 'ffffff'
  • '#fff'
  • 'fff'
RGB
  • '255, 255, 255'
  • '255 255 255'

Code

const colors = require('colors-md');

console.log(colors.ansi8.hex('#ff0000') + 'text' + colors.reset);
console.log(colors.ansi256.hex('0f0') + 'text' + colors.reset);

console.log(colors.ansi8.rgb('0, 0, 255') + 'text' + colors.reset);
console.log(colors.ansi256.rgb('255 255 255') + 'text' + colors.reset);
0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago