src/Color.php
public function toRGB()
    {
        $h = $this->hue;
        $s = $this->saturation / 100;
        $l = $this->lightness / 100;
        $r;
        $g;
        $b;
        $c = (1 - abs(2 * $l - 1)) * $s;
        $x = $c * (1 - abs(fmod(($h / 60), 2) - 1));
        $m = $l - ($c / 2);
        if ($h < 60) {
            list($r, $g, $b) = [$c, $x, 0];
        } elseif ($h < 120) {
            list($r, $g, $b) = [$x, $c, 0];
        } elseif ($h < 180) {
            list($r, $g, $b) = [0, $c, $x];
        } elseif ($h < 240) {
            list($r, $g, $b) = [0, $x, $c];
        } elseif ($h < 300) {
            list($r, $g, $b) = [$x, 0, $c];
        } else {
            list($r, $g, $b) = [$c, 0, $x];
        }
        $r = ($r + $m) * 255;
        $g = ($g + $m) * 255;
        $b = ($b + $m) * 255;

        return [
            round($r),
            round($g),
            round($b),
        ];
    }
public function toRGB()
    {
        $h = $this->hue;
        $s = $this->saturation / 100;
        $l = $this->lightness / 100;
        $r;
        $g;
        $b;
        $c = (1 - abs(2 * $l - 1)) * $s;
        $x = $c * (1 - abs(fmod(($h / 60), 2) - 1));
        $m = $l - ($c / 2);
        if ($h < 60) {
            list($r, $g, $b) = [$c, $x, 0];
        } elseif ($h < 120) {
            list($r, $g, $b) = [$x, $c, 0];
        } elseif ($h < 180) {
            list($r, $g, $b) = [0, $c, $x];
        } elseif ($h < 240) {
            list($r, $g, $b) = [0, $x, $c];
        } elseif ($h < 300) {
            list($r, $g, $b) = [$x, 0, $c];
        } else {
            list($r, $g, $b) = [$c, 0, $x];
        }
        $r = ($r + $m) * 255;
        $g = ($g + $m) * 255;
        $b = ($b + $m) * 255;

        return [
            round($r),
            round($g),
            round($b),
        ];
    }
public function toRGB ( ) { $ h = $ this -> hue ; $ s = $ this -> saturation / 100 ; $ l = $ this -> lightness / 100 ; $ r ; $ g ; $ b ; $ c = ( 1 - abs ( 2 * $ l - 1 ) ) * $ s ; $ x = $ c * ( 1 - abs ( fmod ( ( $ h / 60 ) , 2 ) - 1 ) ) ; $ m = $ l - ( $ c / 2 ) ; if ( $ h < 60 ) { list ( $ r , $ g , $ b ) = [ $ c , $ x , 0 ] ; } elseif ( $ h < 120 ) { list ( $ r , $ g , $ b ) = [ $ x , $ c , 0 ] ; } elseif ( $ h < 180 ) { list ( $ r , $ g , $ b ) = [ 0 , $ c , $ x ] ; } elseif ( $ h < 240 ) { list ( $ r , $ g , $ b ) = [ 0 , $ x , $ c ] ; } elseif ( $ h < 300 ) { list ( $ r , $ g , $ b ) = [ $ x , 0 , $ c ] ; } else { list ( $ r , $ g , $ b ) = [ $ c , 0 , $ x ] ; } $ r = ( $ r + $ m ) * 255 ; $ g = ( $ g + $ m ) * 255 ; $ b = ( $ b + $ m ) * 255 ; return [ round ( $ r ) , round ( $ g ) , round ( $ b ) , ] ; }
Outputs the color using the RGB format.

@return array RGB representation of the color
Outputs the color using the RGB format .