1.1.0 • Published 11 months ago

hexpaint v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

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')
1.1.0

11 months ago

1.0.0

12 months ago