Skip to content
The small library to manipulate with colors and color schemes.
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Jan 20, 2020
__tests__ 1.0.0 Jan 22, 2020
public 1.0.0 Jan 22, 2020
src upd docs Jan 22, 2020
.gitattributes initial 1.0.0 Jan 19, 2020
.gitignore rename types to _types Jan 22, 2020
CHANGELOG.md initial 1.0.0 Jan 19, 2020
DOCUMENTATION.md upd docs Jan 22, 2020
LICENSE initial 1.0.0 Jan 19, 2020
README.md upd readme Jan 21, 2020
babel.config.js init test Jan 19, 2020
index.js init test Jan 19, 2020
package.json No need babel-core because it is already done with @babel/core Jan 22, 2020
webpack.config.js fix hsv, hsl converters Jan 20, 2020

README.md

Dependencies License: MIT GitHub code size in bytes GitHub release

ColorJS - Manipulate with color

ColorJS is a javascript class designed to work with color. The class implements static and dynamic methods for conveniently working with color, converting it to various formats and generating special color schemes. ColorJs provides simple API that may be used to create colors (HEX, RGB, RGBA, HSV, HSL, HSLA, CMYK) and perform various color related operations (conversions and such) and create any color schemes (complementary, triple, ...)

Contributing ColorJS

Clone repository / Get source

git clone https://github.com/olton/colorjs

Run tests

yarn test

Install ColorJS

With npm

npm install @olton/colorjs --save-dev

With yarn

yarn add --dev @olton/colorjs

Importing ColorJS

import Color from "@olton/colorjs";

Non static mode

const color = new Color("#ffffff");
console.log(color.toRGB()); // RGB {r: 255, g: 255, b: 255}
console.log(color.toRGB().toString()); // rgb(255,255,255)

Static mode

console.log(Color.toRGB("#ffffff")); // RGB {r: 255, g: 255, b: 255}
console.log(Color.toRGB("#ffffff").toString()); // rgb(255,255,255)

Documentation

You can find the documentation at this link.

License

This software is free to use under the MIT license. See the LICENSE file for license text and copyright information.

You can’t perform that action at this time.