Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the color '#c411a6' break randomColor? #141

Closed
kuworking opened this issue Dec 22, 2020 · 3 comments
Closed

Does the color '#c411a6' break randomColor? #141

kuworking opened this issue Dec 22, 2020 · 3 comments

Comments

@kuworking
Copy link

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 kuworking changed the title Does it breaks randomColor? Does the color '#c411a6' break randomColor? Dec 22, 2020
@daniegarcia254
Copy link

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

@hmendezm
Copy link

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

@hmendezm
Copy link

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.

davidmerfield added a commit that referenced this issue Aug 9, 2023
Rewrote the HexToHSB function. This fixes #141
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants