[p5.js 2.0 Bug Report]: p5.Color.toString() outputs incorrect values
Open
Nobody has claimed this yet.
Area:Color
p5.js 2.0+
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
...
p5.js version
2.2
Steps:
- Create a new p5.Color object
- call its toString()
- note the incorrect values
Snippet:
function setup() {
createCanvas(400, 400);
print(new p5.Color([100,100,200]).toString());
print(new p5.Color(100).toString());
print(new p5.Color('violet').toString());
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided snippet with p5.js 2.2 and inspect the p5.Color.toString() implementation. Compare the three outputs with the expected color representations; done means the reported values are corrected and the behavior is covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100