push() ignores the _colorMaxes field set by colorMode()
Most appropriate sub-area of p5.js?
- [ ] Accessibility
- [X] Color
- [X] Core/Environment/Rendering
- [ ] Data
- [ ] DOM
- [ ] Events
- [ ] Image
- [ ] IO
- [ ] Math
- [ ] Typography
- [ ] Utilities
- [ ] WebGL
- [ ] Build process
- [ ] Unit testing
- [ ] Internationalization
- [ ] Friendly errors
- [ ] Other (specify if possible)
p5.js version
v1.11.0
Web browser and version
Firefox 128.5.1esr
Operating system
Windows 10
Steps to reproduce this
Steps:
- Call push()
- Call colorMode() with a non-default max color value
- Call pop(), all color calls after that will still continue to use the max color values specified in the push() section
Snippet:
function draw() {
colorMode(RGB, 1.0);
background(0.5);
push();
//colorMode(RGB, 0.5); // Uncomment me for fun and bugs
pop();
textSize(32);
fill(0.5);
text('Oh no', 50, 50);
}
Welcome! š Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
Looking at the code responsible for push(), it seems like it would be a very simple change to make the function hold onto the value of _colorMaxes too.
I would be happy to submit a change that fixes this bug, if this is considered an issue.
Hi @zeesworth , Iām interested in working on this issue. Could you please assign it to me ?
I'm not an admin of the repository so I'm not able to do that sadly
Can I work on this issue?
@perminder-17 As there is inactivity, can I work on this?
@mahi6299 are you still working on it? Let me know if you have any doubts :)
No, I'm not working