# is-color-stop

> Check if a string is CSS color stop

Latest version **1.1.0** (published 2017-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-color-stop
pnpm add is-color-stop
yarn add is-color-stop
bun add is-color-stop
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-07-25 |
| First published | 2017-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | pigcan |
| Maintainers | pigcan |
| Keywords | color-stop, is-color |

## Links

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

## Dependencies (6)

- [hsl-regex](https://npm.io/package/hsl-regex.md) ^1.0.0
- [rgb-regex](https://npm.io/package/rgb-regex.md) ^1.0.1
- [hsla-regex](https://npm.io/package/hsla-regex.md) ^1.0.0
- [rgba-regex](https://npm.io/package/rgba-regex.md) ^1.0.0
- [css-color-names](https://npm.io/package/css-color-names.md) ^0.0.4
- [hex-color-regex](https://npm.io/package/hex-color-regex.md) ^1.1.0

## 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

- 1.1.0 (latest) — 2017-07-25
- 1.0.0 — 2017-07-25

## README

# is-color-stop

Check if a string is CSS color stop

[![NPM version](https://img.shields.io/npm/v/is-color-stop.svg?style=flat)](https://npmjs.org/package/is-color-stop)
[![Build Status](https://img.shields.io/travis/pigcan/is-color-stop.svg?style=flat)](https://travis-ci.org/pigcan/is-color-stop)
[![Coverage Status](https://img.shields.io/coveralls/pigcan/is-color-stop.svg?style=flat)](https://coveralls.io/r/pigcan/is-color-stop)
[![NPM downloads](http://img.shields.io/npm/dm/is-color-stop.svg?style=flat)](https://npmjs.org/package/is-color-stop)
[![Dependency Status](https://david-dm.org/pigcan/is-color-stop.svg)](https://david-dm.org/pigcan/is-color-stop)


## Install

```shell
$ npm install is-color-stop
```

## Usage

```js
const isColorStop = require('is-color-stop');

isColorStop('yellow') // true
isColorStop('yellow', '12px') // true
isColorStop('yellow', 'calc(100%)') // true
isColorStop('yellow', 'px') // false

isColorStop.isColor('red') // true
isColorStop.isColor('rgb(255)') // false

isColorStop.isRGB('rgb(255, 0, 0)') // true
isColorStop.isRGB('rgb(255)') // false

isColorStop.isRGBA('rgba(255, 0, 0, .8)') // true
isColorStop.isRGBA('rgba(255, 0, 0)') // false

isColorStop.isHSL('hsl(123, 45%, 67%)') // true
isColorStop.isHSL('hsl(123, 45%)') // false

isColorStop.isHSLA('hsla(123, 45%, 67%, 0.4)') // true
isColorStop.isHSLA('hsla(123, 45%, 67%)') // false

isColorStop.isHex('#fff') // true
isColorStop.isHex('#ff') // false

isColorStop.isCSSColorName('tomato') // true
isColorStop.isCSSColorName('hoge') // false

isColorStop.isCSSLengthUnit('px') // true
isColorStop.isCSSLengthUnit('x') // false

isColorStop.isTransparent('transparent') // true
```

## License

The MIT License (MIT)

Copyright (c) 2017 Pigcan

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