I try to get material diffuse color as RGB value from the object, but on one object it gives RGB value as numbers and on some gives a name like “black”. I need numbers only, no names.
If the color is a predifined named color it will indeed print the name rather than the A R G B values.
to retrieve the RGB values you can get it’s RGB values individually like so:
mcolor = rs.MaterialColor(materialindex)
r = mcolor.R
g = mcolor.G
b = mcolor.B
print r,g,b