Skip to content

maxbook/colors-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Colors JS

Color helpers in javascript

Convert CSS hex to RGB array

cssHexToRgb('#3364B3');
/*
return array :
{ r: 51, g: 100, b: 179 }
*/

Convert RGB to CSS hex string

rgbToCssHex(51, 100, 179);
/*
return string :
#3364b3
*/

Lighten color

Increase the lightness of a color.

  • color : Css hex string
  • amount : A percentage 0-100.
lighten('#3364B3', 10);
/*
return string :
#4773ba
*/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published