src/Alg/ColorConverter.php
public static function rgb2xyz( $rgb )
	{
		list( $r, $g, $b ) = $rgb;
		$r	= $r / 255;
		$g	= $g / 255;
		$b	= $b / 255;
		$x	= 0.430574 * $r + 0.341550 * $g + 0.178325 * $b;
		$y	= 0.222015 * $r + 0.706655 * $g + 0.071330 * $b;
		$z	= 0.020183 * $r + 0.129553 * $g + 0.939180 * $b;
		return array( $x, $y, $z );
	}
public static function rgb2xyz( $rgb )
	{
		list( $r, $g, $b ) = $rgb;
		$r	= $r / 255;
		$g	= $g / 255;
		$b	= $b / 255;
		$x	= 0.430574 * $r + 0.341550 * $g + 0.178325 * $b;
		$y	= 0.222015 * $r + 0.706655 * $g + 0.071330 * $b;
		$z	= 0.020183 * $r + 0.129553 * $g + 0.939180 * $b;
		return array( $x, $y, $z );
	}
public static function rgb2xyz ( $ rgb ) { list ( $ r , $ g , $ b ) = $ rgb ; $ r = $ r / 255 ; $ g = $ g / 255 ; $ b = $ b / 255 ; $ x = 0.430574 * $ r + 0.341550 * $ g + 0.178325 * $ b ; $ y = 0.222015 * $ r + 0.706655 * $ g + 0.071330 * $ b ; $ z = 0.020183 * $ r + 0.129553 * $ g + 0.939180 * $ b ; return array ( $ x , $ y , $ z ) ; }
Converts RGB to XYZ.
@access		public
@static
@param		array	rgb		RGB-Color as array
@return		array
Converts RGB to XYZ .