When being on the https://www.shadergradient.co/customize site, removing a color from the color picker (meaning removing the entire hex color) makes the entire website crash. I have included a very short video showing the steps needed to reproduce it.
But here is also a step-by-step guide on to reproduce it
A proposed solution from a UX perspective is to not commit the state change if the color is invalid. Meaning, that if a user has three colors, #ff0000, #00ff00 and #0000ff (Red, Green and Blue) then decides to remove the last color, we do not actually change the state and keep showing that color until a new valid color replaces it
When being on the https://www.shadergradient.co/customize site, removing a color from the color picker (meaning removing the entire hex color) makes the entire website crash. I have included a very short video showing the steps needed to reproduce it.
But here is also a step-by-step guide on to reproduce it
https://github.com/ruucm/shadergradient/assets/77362975/d87df3a4-24f1-4bcb-8e4a-331d1de54c93
A proposed solution from a UX perspective is to not commit the state change if the color is invalid. Meaning, that if a user has three colors, #ff0000, #00ff00 and #0000ff (Red, Green and Blue) then decides to remove the last color, we do not actually change the state and keep showing that color until a new valid color replaces it