Socket
Socket
Sign inDemoInstall

rgbcolor

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rgbcolor

A module to parse color values


Version published
Weekly downloads
1.3M
decreased by-2.14%
Maintainers
1
Install size
12.4 kB
Created
Weekly downloads
 

Readme

Source

node-rgbcolor

A nodejs module to parse color values Based on rgbcolor.js by Stoyan Stefanov sstoo@gmail.com http://www.phpied.com/rgb-color-parser-in-javascript/

Usage

var RGBColor = require('rgbcolor');

var color = new RGBColor('darkblue');

if (color.ok) { // 'ok' is true when the parsing was a success
    // log channels
    console.log(color.r + ', ' + color.g + ', ' + color.b);
    // log HEX and RGB
    console.log(color.toHex());
    console.log(color.toRGB());
}

Keywords

FAQs

Last updated on 26 Apr 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc