Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including is-rgb-color with all npm packages installed. Try it out:

var isRgbColor = require("is-rgb-color")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

is-rgb-color v0.0.1

Loosely check whether a string is an RGB(A) color string.

is-rgb-color

Loosely check whether a string is an RGB(A) color string.

Installation

$ component install segmentio/is-rgb-color
$ npm install is-rgb-color

API

isRgbColor(string)

Loosely checks whether a string is an RGB(A) color string. Loose in that it doesn't cap numbers to 255, which CSS doesn't care about either.

License

MIT

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free