ScratchAddons / ScratchAddons

All-in-one browser extension for Scratch.
https://scratchaddons.com
GNU General Public License v3.0
718 stars 370 forks source link

Issue with gray colors in settings page color picker #2082

Open mxmou opened 3 years ago

mxmou commented 3 years ago

Describe the bug

Changing the hue of a gray color (saturation = 0), then changing the saturation makes the color red instead of the selected hue.

To Reproduce

  1. Open the setting page
  2. Open any color picker and set saturation to 0
  3. Close the picker
  4. Open it again and change the hue
  5. Change the saturation
  6. The preview shows red instead of the hue you selected earlier

Expected behavior

The hue would change correctly.

cobaltt7 commented 3 years ago

cc @GDUcrash

WorldLanguages commented 3 years ago

cc @GrahamSH-LLK

GrahamSH-LLK commented 3 years ago

This is an underlying library bug I'll have to figure out. I'll take a look after school

apple502j commented 3 years ago

Fun fact: this exists in Scratch color picker too, I think this is an intended behavior

GrahamSH-LLK commented 3 years ago

Fun fact: this exists in Scratch color picker too, I think this is an intended behavior

Huh, interesting! I can't think of a reason, any ideas?

mxmou commented 3 years ago

Fun fact: this exists in Scratch color picker too, I think this is an intended behavior

I'm able to change the color when saturation is 0 in Scratch's color picker normally.

apple502j commented 3 years ago

Saturation is saved when the color picker is actually closed (not onchange)

mxmou commented 3 years ago

I don't think I explained this very well so here are two gifs demonstrating the issue: saturation_bug2 saturation_bug1 Note that closing and reopening the picker doesn't fix anything, only changing the hue again does.