COLOR OBJECT This command will color the specified 3D object using an RGB colour value.
Syntax
    COLOR OBJECT Object Number, Color Value
Parameters
    Object Number
Integer The object number
    Color Value
Dword The rgb colour value
Returns
This command does not return a value.
Description
The colour value can be specified using the RGB() command. The parameters should be specified using integer values. Some objects loaded from a model file may not be colored if they do not already contain diffuse color data.
Example Code
    sync on : sync rate 0 : hide mouse:cls 0

    ObjectNumber=1

    SecondObject=2

    load object "model.x",ObjectNumber

    rotate object ObjectNumber, 270, 0, 0

    fix object pivot ObjectNumber

    point object ObjectNumber,0,0,0

    position object ObjectNumber, 0,0,0

    load object "model.x",SecondObject

    color object SecondObject,rgb(0,255,0)

    while mouseclick()=0

    if inkey$()="r" then rotate object ObjectNumber, 0,wrapvalue(object angle y(1)+1),0

    if inkey$()="x" then xrotate object ObjectNumber,wrapvalue(object angle x(1)+1)

    if inkey$()="y" then yrotate object ObjectNumber,wrapvalue(object angle y(1)+1)

    if inkey$()="z" then zrotate object ObjectNumber,wrapvalue(object angle z(1)+1)

    sync

    endwhile

    delete object ObjectNumber

    delete object SecondObject

    end
See also
BASIC3D Commands Menu Index