Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@xbell/color

xlianghang510.8.14TypeScript support: included

null

readme

@xbell/color

Installation

$ npm install @xbell/color

Usage

import color from '@xbell/color';

// Chain usage
console.log(
  color.bold.italic.red('hello')
);

console.log(
  color.bold.italic.bgRed('hello')
);

// custom color
console.log(
  color.rgb(255, 0, 0)('hello')
);
console.log(
  color.hex('#FF0000')('hello')
);

// gradient color
console.log(
  color.bold.gradient('#FF0000', '#00FF00')('hello')
);
console.log(
  color.bold.gradient([255, 0, 0], [0, 255, 0])('hello')
);

// radinbow color(internal gradient)
console.log(
  color.bold.rainbow('hello')
);