public function setColor($r, $g, $b) { $this->color = (($r & 0xff) << 16) + (($g & 0xff) << 8) + ($b & 0xff); }