string-to-color
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -22,3 +22,3 @@ var toHex = require('colornames'); | ||
var color = toHex(word); | ||
if (color) colors.push(hexRgb(trimStart(color, '#'))); | ||
if (color) colors.push(hexRgb(trimStart(color, '#'), {format: 'array'})); | ||
}); | ||
@@ -51,3 +51,3 @@ return colors; | ||
hex = padEnd(hex, 6, hex); | ||
var rgb = hexRgb(hex); | ||
var rgb = hexRgb(hex, {format: 'array'}); | ||
if (mixed) | ||
@@ -54,0 +54,0 @@ return rgbHex( |
{ | ||
"name": "string-to-color", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Generates color from any string or any object", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
@@ -8,0 +7,0 @@ "test": "./node_modules/.bin/mocha test" |
@@ -20,3 +20,3 @@ var should = require('chai').should(); | ||
var hex = generate("i am a red fox"); | ||
var rgb = hexRgb(hex); | ||
var rgb = hexRgb(hex, {format: 'array'}); | ||
rgb[0].should.be.above(rgb[1]); | ||
@@ -23,0 +23,0 @@ rgb[0].should.be.above(rgb[2]); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34574
9