# is-css-color-hex

> Determine if a string is a valid CSS color hex

Latest version **0.2.0** (published 2016-01-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-css-color-hex
pnpm add is-css-color-hex
yarn add is-css-color-hex
bun add is-css-color-hex
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-01-11 |
| First published | 2015-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dustin Specker |
| Maintainers | dustinspecker |
| Keywords | css, color, hex |

## Links

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

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2016-01-11
- 0.1.1 — 2015-11-13
- 0.1.0 — 2015-08-30

## README

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

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

> Determine if a string is a valid CSS color hex

## Install
```
npm install --save is-css-color-hex
```

## Usage
### ES2015
```javascript
import isCSSColorHex from 'is-css-color-hex';

isCSSColorHex(1);
// => false

isCSSColorHex('0aC');
// => false

isCSSColorHex('0aCf');
// => false

isCSSColorHex('01AbCd');
// => false

isCSSColorHex('01AbCdff');
// => false

isCSSColorHex('#0aC');
// => true

isCSSColorHex('#0aCf');
// => true

isCSSColorHex('#01AbCd');
// => true

isCSSColorHex('#01AbCdfF');
// => true
```

### ES5
```javascript
var isCSSColorHex = require('is-css-color-hex');

isCSSColorHex(1);
// => false

isCSSColorHex('0aC');
// => false

isCSSColorHex('0aCf');
// => false

isCSSColorHex('01AbCd');
// => false

isCSSColorHex('01AbCdff');
// => false

isCSSColorHex('#0aC');
// => true

isCSSColorHex('#0aCf');
// => true

isCSSColorHex('#01AbCd');
// => true

isCSSColorHex('#01AbCdfF');
// => true
```

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

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