randomColor icon indicating copy to clipboard operation
randomColor copied to clipboard

Does the color '#c411a6' break randomColor?

Open kuworking opened this issue 5 years ago • 3 comments

I'm seeing that this code breaks the generation or randomColor, but I find this esoterical so it's likely something else

  console.log(randomColor({
    count: 5,
    luminosity: 'light',
    hue: '#c411a6',
  }))

I do see it in a codesandbox

import "./styles.css";
import randomColor from 'randomcolor'

console.log(randomColor({
  count: 5,
  luminosity: 'light',
  hue: '#ffffff',
}))

console.log(randomColor({
  count: 5,
  luminosity: 'light',
  hue: '#c411a6',
}))

document.getElementById("app").innerHTML = `
<h1>Hello Vanilla!</h1>
<div>
  We use the same configuration as Parcel to bundle this sandbox, you can find more
  info about Parcel 
  <a href="https://parceljs.org" target="_blank" rel="noopener noreferrer">here</a>.
</div>
`;

The hue value is from a previous randomly randomColor-generated array

image

kuworking avatar Dec 22 '20 19:12 kuworking

I'm having same issue using #f9c2e3 as hue property. It is as well a color previously generated with randomColor (using last library version)

daniegarcia254 avatar Jan 21 '21 09:01 daniegarcia254

Hi guys, is this fixed in the version 0.6.2? I have the same issue with the color #840052 best Hmendez

hmendezm avatar Aug 11 '21 17:08 hmendezm

I checked the version 0.6.2 that I have in my app and I noticed that itsmygit solution for hextohsb is not in this version.

hmendezm avatar Aug 11 '21 17:08 hmendezm