Skip to content

nick747/iris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iris logo


Iris is a JavaScript library designed to facilitate the management of RGB and HEX colors.


Installation

To install Iris simply go to your preferred code editor and in its terminal run the following command:

 
$ npm i iris-colors
 

Usage

To start using the library in your project, import it in the main file:

 
import iris from 'iris-colors';
 

Functions

The Iris library offers 6 different functions: getType(), toRgb(), toHex(), randomColor(), findComplementary(), addOpacity().

The getType() function

The getType() function is useful to get the type of a color from input. It will detect if the input color is an rgb or an hex color. If it doesn't understand the type of the input color it will return invalid.

 
import iris from 'iris-colors';

let type = iris.getType('#ff0000');

console.log(type);
 
 
>> 'hex'
 

About

Iris is a JavaScript/TypeScript library that helps manage RGB and HEX colors

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published