shorten-hex-colordeprecated

Shorten a 6-digit HEX code to the closest 3-digit HEX code.

Usage no npm install needed!

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

README

shorten-hex-color

Shorten a 6-digit HEX code to the closest 3-digit HEX code.

npm version Build Status Greenkeeper badge dependency status dev dependency status license chat on gitter

Installation

npm install --save shorten-hex-color

shorten(hex)

const shorten = require('shorten-hex-color')

const shortColor = shorten('#00738a') // '#078'

Contributing

If you found a bug, want to propose a feature or feel the urge to complain about your life, feel free to visit the issues page.