davidmerfield / davidmerfield/randomColor

Setting count makes hue turn red

Open
#127 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
6.1k
Forks
408
PR merge metrics
No merged PRs in 30d

Description

**Update:** I have run several tests. Setting count is the cause of this bug.

I used this shell function for testing:
```sh
random-color-f () {
node -e "var randomColor = require('randomcolor'); // import the script
var color = randomColor({count: 1}); // a hex code for an attractive color
console.log(JSON.stringify(color))" | jq -re '.[]'
}
```

**Old report where I thought setting `hue` to `random` is the problem:**

Here is a recording (In which I use the CLI of #126):
https://asciinema.org/a/262144
Here are screenshots of the gist of the video:
![image](https://user-images.githubusercontent.com/36224762/62942801-53f5e200-bdee-11e9-8429-9a5bad5e0669.png)

![image](https://user-images.githubusercontent.com/36224762/62942838-6708b200-bdee-11e9-99c4-30b0cb190f7d.png)

I have tested this multiple times, it always uses red. Possibly related to https://github.com/davidmerfield/randomColor/issues/114.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.