expand-hex-code
Expand hex codes from three to six digits
Installation
npm
With npm install expand-hex-code
yarn
With yarn add expand-hex-code
Usage
In a node project
Import the script to your project
;// orconst expandHexCode = ;
And execute the script:
const hexCode = ; // #000000const hexCode = ; // #ccbb00const hexCode = ; // #ffffff
Contributing
Fork the repo and clone locally, then run:
yarn install
This will install the devDependencies
packages and build the dist
folder.
Once you've made your desired changes, make sure to write any new tests for your feature and run the tests:
yarn test
If all tests pass, create a pull request.