How do I get the material name from a non-meshed object? (Like a text object for example)

Usually on a meshed object I use obj.meshes[0].materials[0].name to do so, but that doesn’t work on text objects even if the material still exists.

Any help?

you cant bc its probably not even there to start.

change the color of text by textobj.color = (r,g,b,a)