I was wondering if there was an easier way to do this, I want to make a Color3 readable to myself to know if I’m using it properly (r,g,b • 255) but was wondering if there was an easier way to do the following:
local test = Color3.fromHSV(Color3.toHSV(Color3.fromRGB(179, 155, 255)))
print(test.R * 255, test.G * 255, test.B * 255) -- can I get rid of the 3 operations and use a single operation instead?
local oldvec = Vector3.new(1,1,1)
oldvec += oldvec
Is there an equivalent to doing this with Color3s?
@D0RYU - I’m giving users the option to input their own UI accent colour using hue, saturation and value (which is easier than messing with R,G and B values. I am really only asking to check my method of doing things to check if I’m using toHSV and fromHSV correctly.
I’m not complaining, I am just saying that Color3.new takes values that are equal or less than 1 whereas the standard for readability is 255 (eg. Google).
Only thing I would do to make it more readable is to use functions. To answer the comment from the code, no you can’t, and I don’t think there’s an equivalent to shorten the operations to Color3s.
function MultiplyColor3s(color)
local r = color.R*255
local g = color.G*255
local b = color.B*255
return r,g,b
end
local color = Color3.fromHSV(Color3.toHSV(Color3.fromRGB(179, 155, 255)))
print(MultiplyColor3s(color))