# Saturation returning the wrong values

**URL:** https://discourse.processing.org/t/saturation-returning-the-wrong-values/22286
**Category:** p5.js
**Created:** [June 30, 2020, 8:26pm UTC](https://discourse.processing.org/t/saturation-returning-the-wrong-values/22286 "2020-06-30T20:26:31Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![JoeMcKay](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@JoeMcKay](https://discourse.processing.org/u/JoeMcKay)
#### Post date: [June 30, 2020, 8:26pm UTC](https://discourse.processing.org/t/saturation-returning-the-wrong-values/22286/1 "2020-06-30T20:26:31Z")

</div>

Hi all.  
I’m trying to make a color picker and ran into a bug - saturation() isn’t giving me the correct values.  
I created a gradient using hsb color. When I mouseOver the gradient and use get(mouseX, mouseY) to collect color under the mouse it returns all the correct values but the saturation is wrong.  
Here’s an example of what I mean.  
[https://editor.p5js.org/Joemckay/sketches/2NMSFqN7u](https://editor.p5js.org/Joemckay/sketches/2NMSFqN7u)  
When I duplicated the sketch in Processing it works fine.  
Anyone else run into this problem, or is it a known issue? I don’t see any bug reports for it, but I suck at githubbing so maybe I missed it?

---

_[View the full topic](https://discourse.processing.org/t/saturation-returning-the-wrong-values/22286)._
