npm-colorcode

get color name by code or get code by color name

Usage no npm install needed!

<script type="module">
  import npmColorcode from 'https://cdn.skypack.dev/npm-colorcode';
</script>

README

About

Get Color name by code

Installation

Use the package for get color name

npm install npm-colorcode

Usage

const colorcode = require('npm-colorcode');
/* Pass inside the two params 1st your color code and in second then second with true  for color name,
*/ 
colorcode("000000", true); // Black
/*if you want color code by color name then pass false in second params*/
colorcode('Black', false); // #000000
/*it will return a String value.*/

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.