function convertRGBtoVERTEX(RGB)
end)
How I could be able to convert an
RGB
color toVERTEX
color?
Is this even possible? Because I am trying to get RGB color to color an Mesh
, which uses VERTEX color, however It doesn’t work.
function convertRGBtoVERTEX(RGB)
end)
How I could be able to convert an
RGB
color toVERTEX
color?
Is this even possible? Because I am trying to get RGB color to color an Mesh
, which uses VERTEX color, however It doesn’t work.
Are you talking about The SpecialMesh.VertexColor
property? Vertex here can mean many things.
Edit: you have included this.
Okay, so since VertexColor
is a Vector3
, just construct a Vector3 out of the RGB components!
local function convert_rgb_to_vertex(c3)
return Vector3.new(c3.R, c3.G, c3.B)
end
Yes, VertexColor, I said already in the title.
I have edited my post to address this
I don’t know if it us due to a ROBLOX change, but the VertexColor is a .unit vector. So make sure when you create your vector of your desired colors you make it a unit vector.
ex: Vector3.new(61, 255, 148).Unit → 0.203, 0.847, 0.492
And this gives you your desired color.