shift73k/assets_old/node_modules/is-color-stop
2022-08-13 07:32:36 -04:00
..
lib progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
test progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
util progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
.eslintrc progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
.npmignore progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
.travis.yml progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
HISTORY.md progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
index.js progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
LICENSE progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
package.json progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
README.md progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00

is-color-stop

Check if a string is CSS color stop

NPM version Build Status Coverage Status NPM downloads Dependency Status

Install

$ npm install is-color-stop

Usage

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