How to convert RGB color to VERTEX color?

function convertRGBtoVERTEX(RGB)

end)

How I could be able to convert an RGB color to VERTEX 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
8 Likes

Yes, VertexColor, I said already in the title.

you mean to this thing? or by using roblox mesh?
vertex color in blender


vertex color in roblox

2 Likes

I have edited my post to address this

3 Likes

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.

2 Likes