# shorten-css-hex

> Shorten CSS hex codes

Latest version **1.1.0** (published 2016-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install shorten-css-hex
pnpm add shorten-css-hex
yarn add shorten-css-hex
bun add shorten-css-hex
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-01-12 |
| First published | 2015-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/shorten-css-hex) |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Dustin Specker |
| Maintainers | dustinspecker |
| Keywords | css, hex, minify |

## Links

- npm: https://www.npmjs.com/package/shorten-css-hex
- Repository: https://github.com/dustinspecker/shorten-css-hex
- Homepage: https://github.com/dustinspecker/shorten-css-hex#readme
- Issues: https://github.com/dustinspecker/shorten-css-hex/issues
- npm.io page: https://npm.io/package/shorten-css-hex

## Dependencies (1)

- [is-css-color-hex](https://npm.io/package/is-css-color-hex.md) ^0.2.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2016-01-12
- 1.0.0 — 2015-10-27
- 0.2.0 — 2015-09-04
- 0.1.0 — 2015-09-03

## README

# shorten-css-hex
[![NPM version](https://badge.fury.io/js/shorten-css-hex.svg)](https://badge.fury.io/js/shorten-css-hex) [![Build Status](https://travis-ci.org/dustinspecker/shorten-css-hex.svg)](https://travis-ci.org/dustinspecker/shorten-css-hex) [![Coverage Status](https://img.shields.io/coveralls/dustinspecker/shorten-css-hex.svg)](https://coveralls.io/r/dustinspecker/shorten-css-hex?branch=master)

[![Code Climate](https://codeclimate.com/github/dustinspecker/shorten-css-hex/badges/gpa.svg)](https://codeclimate.com/github/dustinspecker/shorten-css-hex) [![Dependencies](https://david-dm.org/dustinspecker/shorten-css-hex.svg)](https://david-dm.org/dustinspecker/shorten-css-hex/#info=dependencies&view=table) [![DevDependencies](https://david-dm.org/dustinspecker/shorten-css-hex/dev-status.svg)](https://david-dm.org/dustinspecker/shorten-css-hex/#info=devDependencies&view=table)

> Shorten CSS hex codes

## Install
```
npm install --save shorten-css-hex
```

## Usage
### ES2015
```javascript
import shortenCssHex from 'shorten-css-hex';

shortenCssHex('#000000');
// => '#000'

shortenCssHex('#AaBBcC');
// => '#abc'

shortencsshex('#112233ff');
// => '#123f'

shortencsshex('#123456');
// => '#123456'

shortencsshex('#123456ff');
// => '#123456ff'
```

### ES5
```javascript
var shortenCssHex = require('shorten-css-hex');

shortenCssHex('#000000');
// => '#000'

shortenCssHex('#AaBBcC');
// => '#abc'

shortencsshex('#112233ff');
// => '#123f'

shortencsshex('#123456');
// => '#123456'

shortencsshex('#123456ff');
// => '#123456ff'
```

## LICENSE
MIT © [Dustin Specker](https://github.com/dustinspecker)

---
_Source: https://npm.io/package/shorten-css-hex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
