We have a HSV constructor for Color3, but no properties for those values. This means we can’t easily interpolate except by manually tracking the values ourselves. Right now I can’t do
color = Color3.fromHSV(color.h, color.s, color.v - 0.1)
I’d have to calculate the current hsv from rgb (the whole reason fromHSV was created in the first place) to do something like that.
A mathematical procedure is used to calculate HSV and therefore they aren’t stored in memory. It’s the same reason that euler angles aren’t stored in memory and instead a rotation matrix is, that’s why you have toEulerAnglesXYZ and fromEulerAnglesXYZ but no AngleX, AngleY and, AngleZ.
They could perform the procedure whenever the color is created, so that HSV is always available for each color object, but that would mean more computations are needed to construct a Color3 object (and more memory), so the overall execution time of code that constructs large amounts of Color3 objects would go up.
I think it would look a little more like this (pretending Color3 was implemented in Lua):
function Color3:__index(i)
if i=="h" or i=="s" or i=="v" then
local h, s, v = self:toHSV();
rawset(self, "h", h);
rawset(self, "s", s);
rawset(self, "v", v);
return rawget(self, i);
end
end
What I mean to convey is that there’s no reason why it would have to be inefficient.
This is the same scenario as Vector3.unit or Vector3.magnitude.