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

Package detail

moo-color

archco8.3mMIT1.0.3TypeScript support: included

A javascript class that provides convenience for color parsing and manipulating.

color

readme

MooColor

Node.js CI npm version Downloads

A javascript class that provides convenience for color parsing and manipulating.

Install

npm install moo-color

Usage

import MooColor from 'moo-color';

const color = new MooColor('#f00');

color.whiten(10).toString('hwb'); // returns 'hwb(0, 10%, 0)'

API

Please see MooColor API.

Change Log

CHANGELOG.md

license

MIT License

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

1.0.3 - 2022-04-04

  • Lint codes.
  • Fix docs.
  • Update dependencies.

1.0.2 - 2019-12-31

  • Refined some regex. (073832a8ef0a74503cc30cfe89489fbefbc1d160)
  • Update docs. (6ebd08963b19bc8a0fceb062d17a11fe7eb70144)

1.0.0 - 2019-10-17

Updated

  • Update dependencies.

0.2.2 - 2018-06-11

Fixed

  • Fix util methods padStart() and padEnd(). (1ded7bb88e1712fe5b60801aca29a5df44a4ecbc)

0.2.0 - 2018-05-16

Changed

  • Now available give color argument as ColorData in MooColor constructor. #7
  • Changes random() to static method. #6

Removed

  • Removed random() method. use static random() method instead.

0.1.3 - 2018-03-30

Added

  • Add default exports.

0.1.1 - 2018-03-02

Added

  • Add methods for manipulate. complement() and invert(). #2
  • Add method random(). #5
  • Write docs. #4

Changed

  • Improve formatter. #3
    • toHex(): Change argument enableShort: boolean to mode: 'full'|'short'|'name'.
    • toRgb(): add mode: 'default'|'percent' argument.

0.1.0

First release.