Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

shorten-hex-color

juliuste9ISCdeprecated0.0.0

WARNING: This package is unmaintained and might be broken. There are several other libraries providing the same functionality, e.g. shorten-css-hex

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

hex, rgb, css, color, colour, colors, colours, close, closest, shorten, short, 3, 6, code

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.