ModelData:getDiffuseColor

Returns the diffuse color of a material in the ModelData.

r, g, b, a = ModelData:getDiffuseColor(index)

Arguments

NameTypeDescription
indexnumberThe index of the material.

Returns

NameTypeDescription
rnumberThe red channel of the diffuse color, from 0.0 to 1.0.
gnumberThe green channel of the diffuse color, from 0.0 to 1.0.
bnumberThe blue channel of the diffuse color, from 0.0 to 1.0.
anumberThe alpha channel of the diffuse color, from 0.0 to 1.0.

See also