New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

chroma-console

Package Overview
Dependencies
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chroma-console

Coco, the whimsical debug output package

latest
npmnpm
Version
1.0.40
Version published
Maintainers
0
Created
Source

Chroma Console, aka 'Coco'

License: MIT

Rainbow font, with one import. No configuration needed, just works for terminal or Google Chrome.

alt text

import { Coco } from 'chroma-console';

(...)

Coco.log('testing debug output');

alt text

Big colorful buffers incase you need a visual blurb somewhere...

import { Coco } from 'chroma-console';

(...)

Coco.start();
Coco.end();

alt text

PS, because Mac terminals don't include working with TrueColor, the output will be a bit different alt text

Other Helpers

If you just want to set the text to a color, use these helpers. The next time CoCo outputs a 'log', it will use the default color.

Coco.red('RED TEXT');
Coco.orange('ORANGE TEXT');
Coco.yellow('YELLOW TEXT');
Coco.green('GREEN TEXT');
Coco.blue('BLUE TEXT');
Coco.purple('PURPLE TEXT');
Coco.white('WHITE TEXT');

If you don't like the rainbow, you can set the color to something else!


Coco.setColor('oldmovie');
Coco.setColor('vaporwave');
Coco.setColor('purplehaze');
Coco.setColor('firewood');

Other Other

Uses 🔗 gradient-string

Please note if you want more options, please check out 🔗 Chalk,🔗 Chalk Animation, or🔗colorfy

NPM Package Link - https://www.npmjs.com/package/chroma-console

TODO -

  • typescript types
  • research a better way to global import, instead of importing on every script

Keywords

Coco

FAQs

Package last updated on 16 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts