src/UI/HTML/Indicator.php
public function getColorFromRatio( $ratio ){
		if( $this->getOption( 'invertColor' ) )
			$ratio	= 1 - $ratio;
		$colorR	= ( 1 - $ratio ) > 0.5 ? 255 : round( ( 1 - $ratio ) * 2 * 255 );
		$colorG	= $ratio > 0.5 ? 255 : round( $ratio * 2 * 255 );
		$colorB	= "0";
		return array( $colorR, $colorG, $colorB );
	}
public function getColorFromRatio( $ratio ){
		if( $this->getOption( 'invertColor' ) )
			$ratio	= 1 - $ratio;
		$colorR	= ( 1 - $ratio ) > 0.5 ? 255 : round( ( 1 - $ratio ) * 2 * 255 );
		$colorG	= $ratio > 0.5 ? 255 : round( $ratio * 2 * 255 );
		$colorB	= "0";
		return array( $colorR, $colorG, $colorB );
	}
public function getColorFromRatio ( $ ratio ) { if ( $ this -> getOption ( 'invertColor' ) ) $ ratio = 1 - $ ratio ; $ colorR = ( 1 - $ ratio ) > 0.5 ? 255 : round ( ( 1 - $ ratio ) * 2 * 255 ) ; $ colorG = $ ratio > 0.5 ? 255 : round ( $ ratio * 2 * 255 ) ; $ colorB = "0" ; return array ( $ colorR , $ colorG , $ colorB ) ; }
Returns RGB list of color calculated by ratio.
@access		public
@param		float		$ratio		Ratio (between 0 and 1)
@return		array		List of RGB values
Returns RGB list of color calculated by ratio .