src/Captcha/Captcha.php
public function setColor( $key, $r, $g, $b, $alpha = 0, $range = 0 )
	{
		#	Set color
	
		if( !in_array( $key, array( 'background', 'background_text', 'front_text' ) ) )
			throw new CaptchaException( __METHOD__ . '($key, ) must be one of( background, background_text, front_text ).' );
		
		if( !is_numeric( $r ) || !is_numeric( $g ) || !is_numeric( $b ) || !is_numeric( $alpha ) || !is_numeric( $range ) )
			throw new CaptchaException( __METHOD__ . '( , $args ) second argument and the followers must be numeric values.' );

		# set values
		$property = ( $key == 'background' ) ? '_image_info' : '_' . $key;


		$this->{$property}['color']				= array( $r, $g, $b, $alpha );
		$this->{$property}['color']['range'] 	= $range;
		
		return $this;
		# Method End
	}
public function setColor( $key, $r, $g, $b, $alpha = 0, $range = 0 )
	{
		#	Set color
	
		if( !in_array( $key, array( 'background', 'background_text', 'front_text' ) ) )
			throw new CaptchaException( __METHOD__ . '($key, ) must be one of( background, background_text, front_text ).' );
		
		if( !is_numeric( $r ) || !is_numeric( $g ) || !is_numeric( $b ) || !is_numeric( $alpha ) || !is_numeric( $range ) )
			throw new CaptchaException( __METHOD__ . '( , $args ) second argument and the followers must be numeric values.' );

		# set values
		$property = ( $key == 'background' ) ? '_image_info' : '_' . $key;


		$this->{$property}['color']				= array( $r, $g, $b, $alpha );
		$this->{$property}['color']['range'] 	= $range;
		
		return $this;
		# Method End
	}
public function setColor ( $ key , $ r , $ g , $ b , $ alpha = 0 , $ range = 0 ) { #	Set color if ( ! in_array ( $ key , array ( 'background' , 'background_text' , 'front_text' ) ) ) throw new CaptchaException ( __METHOD__ . '($key, ) must be one of( background, background_text, front_text ).' ) ; if ( ! is_numeric ( $ r ) || ! is_numeric ( $ g ) || ! is_numeric ( $ b ) || ! is_numeric ( $ alpha ) || ! is_numeric ( $ range ) ) throw new CaptchaException ( __METHOD__ . '( , $args ) second argument and the followers must be numeric values.' ) ; # set values $ property = ( $ key == 'background' ) ? '_image_info' : '_' . $ key ; $ this -> { $ property } [ 'color' ] = array ( $ r , $ g , $ b , $ alpha ) ; $ this -> { $ property } [ 'color' ] [ 'range' ] = $ range ; return $ this ; # Method End }
Set Text Color
@param string  $key   define which property to set it's color
@param integer  $r    red value
@param integer  $g    green value
@param integer  $b    blue value
@param integer $alpha alpha value
@param integer $range range
Set Text Color