hex-color-resolve

Resolve hex colors shorthand.

Usage no npm install needed!

<script type="module">
  import hexColorResolve from 'https://cdn.skypack.dev/hex-color-resolve';
</script>

README

Hex Color Resolve Build Status

Resolve hex colors shorthand.

Install

npm install --save hex-color-resolve

Usage

const hexColorResolve = require('hex-color-resolve');

hexColorResolve('#ff0');
//=> #ffff00

hexColorResolve('#ffff00');
//=> #ff0

hexColorResolve('#c2c2c2')
//=> Error

API

hexColorResolve(input)

Returns a new color, shorted or long.

input

Type: string

Test

npm test

License

MIT © Filipe LInhares