@peculiar/color
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@peculiar/color

Library for color manipulation and conversion in JavaScript.

Getting started

To install @peculiar/color in your project, you will need to run the following command using npm:

npm install @peculiar/color

If you prefer Yarn, use the following command instead:

yarn add @peculiar/color

Usage

import { Color } from '@peculiar/color';

const color = new Color('#5EBC54');

color.toHex() // => '5EBC54';
color.toHsb() // => [114, 55, 74];
color.toRgb() // => [94, 188, 84];

palette

The palette generator can be used to generate a palette for any color you input.

import { Color } from '@peculiar/color';

const color = new Color('#5EBC54');

color.palette() // => Record<PaletteTypes, Color>;

📝 License

Licensed under the MIT.

Readme

Keywords

Package Sidebar

Install

npm i @peculiar/color

Weekly Downloads

559

Version

0.1.3

License

MIT

Unpacked Size

57.2 kB

Total Files

59

Last publish

Collaborators

  • rmhrisk
  • microshine
  • yury.strozhevsky
  • peculiarventures
  • apilguk
  • donskov