r = $r; $this->g = $g; $this->b = $b; } /** * Returns Red Color * * @return int */ public function r(){ return $this->r; } /** * Returns Green Color * * @return int */ public function g(){ return $this->g; } /** * Returns Blue Color * * @return int */ public function b(){ return $this->b; } /** * Returns the int value for PHP color * * @return int */ public function allocate($im) { return imagecolorallocate($im,$this->r,$this->g,$this->b); } }; ?>