Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rgb-hex

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rgb-hex - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

index.js

@@ -5,3 +5,3 @@ export default function rgbHex(red, green, blue, alpha) {

if (typeof red === 'string') {
[red, green, blue, alpha] = red.match(/(0?\.?\d{1,3})%?\b/g).map(component => Number(component));
[red, green, blue, alpha] = red.match(/(0?\.?\d+)%?\b/g).map(component => Number(component));
} else if (alpha !== undefined) {

@@ -8,0 +8,0 @@ alpha = Number.parseFloat(alpha);

{
"name": "rgb-hex",
"version": "4.0.0",
"version": "4.0.1",
"description": "Convert RGB(A) color to HEX",

@@ -19,3 +19,4 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd"
"test": "xo && ava",
"//test": "xo && ava && tsd"
},

@@ -22,0 +23,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc