hexpaint
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

hexpaint

Colorize terminal output with ANSI escape codes, using HEX colors. Minimalistic chunk of 'chalk' or 'ansi-colors'. It only colorize text or background with HEX color notation, nothing more! Minified JS takes less than 1K. Correctly treats nested colors.

hexpaint-wrap-bg    hexpaint-open-codes hexpaint-open-tcolor hexpaint-text

Usage

import { hexbg, hexpaint } from 'hexpaint';

console.log(hexpaint('F44336', 'material red'));

console.log(hexbg('689F38'), 23, 'some text', true, hexbg());

console.log(hexbg('F57F17')); // start background
console.log('some text here')
console.log('on several lines')
console.log(hexpaint('B71C1C', 'with colorized text'))
console.log(); // additional newline
console.log(hexbg()); // reset background to default
console.log('no more bg here')

Package Sidebar

Install

npm i hexpaint

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

55.4 kB

Total Files

15

Last publish

Collaborators

  • mkant