protected function constructRGB($red, $green, $blue)
    {
        if ($red < 0)     $red   = 0;
        if ($red > 255)   $red   = 255;
        if ($green < 0)   $green = 0;
        if ($green > 255) $green = 255;
        if ($blue < 0)    $blue  = 0;
        if ($blue > 255)  $blue  = 255;

        $this->r = $red;
        $this->g = $green;
        $this->b = $blue;
    }
protected function constructRGB($red, $green, $blue)
    {
        if ($red < 0)     $red   = 0;
        if ($red > 255)   $red   = 255;
        if ($green < 0)   $green = 0;
        if ($green > 255) $green = 255;
        if ($blue < 0)    $blue  = 0;
        if ($blue > 255)  $blue  = 255;

        $this->r = $red;
        $this->g = $green;
        $this->b = $blue;
    }
protected function constructRGB ( $ red , $ green , $ blue ) { if ( $ red < 0 ) $ red = 0 ; if ( $ red > 255 ) $ red = 255 ; if ( $ green < 0 ) $ green = 0 ; if ( $ green > 255 ) $ green = 255 ; if ( $ blue < 0 ) $ blue = 0 ; if ( $ blue > 255 ) $ blue = 255 ; $ this -> r = $ red ; $ this -> g = $ green ; $ this -> b = $ blue ; }
Construct from an rgb triplet

@param int $red The red component, 0-255
@param int $green The green component, 0-255
@param int $blue The blue component, 0-255
Construct from an rgb triplet