This morning I woke up with a possbile solution to the -360 issue; I added 720 to the value, instead of setting it statically to the lower or higher value. And then if that was still outside of the range, do it again.
Furthermore, I have looked at converting from RGB to HSL. The purpose of this has been so that after the user has chosen the colour they want, they can adjust the brightness and saturation. However, this turned out to be more complicated than I hoped for. I found a library for it, https://github.com/luisllamasbinaburo/Arduino-ColorConverter, but this didn't work for the ESP32. I tried using the functions they were using for the library, but it didn't really give me the right values. I found the right values by using different rbg->hsl / rgb->hsv converters online, and the answers weren't matching. So, either the calculator was wrong, or the code didn't work properly. So far I've tried three different versions of an RGB converter and neither have worked properly. I am starting to consider whether I technically need this, maybe I can find adjustments to the colour otherwise?