The main reason there is no default material function for this is probably that it is actually quite expensive to do in a shader. However, I agree that it can be useful in special cases. I have made both HSV to RGB and RGB to HSV material functions a while back. You’ll can find them here.
Note that they are completely undocumented and unoptimized. If you want to actually use them in a production environment I would recommend you start by reducing the amount of branching going on inside the functions.
I looked at one just like this but I couldn’t figure out what vec4(c.bg, K.wz) does. It’s been a long time since I did any HLSL, is it the same as vec4(c.b, c.g, K.w, K.z)?
I’m fairly certain I left a material function for RGB -> HSV -> RGB in Advanced Cel Shader that’s part of the permanently-free collection on the marketplace.