marshal method
Marshal method must operate by mutating empty object passed.
Implementation
@override
void marshal(MarshalledObject marshalled)
{
// Set properties.
marshalled.setPropertyFromInt("r", red);
marshalled.setPropertyFromInt("g", green);
marshalled.setPropertyFromInt("b", blue);
}