colors/RGBA.php
public function setAlpha($alpha)
    {
        $alpha = (float)$alpha;
        if($alpha < 0 || $alpha > 1) {
            throw new \UnexpectedValueException('value must be within [0, 1]');
        }
        $this->_alpha = $alpha;
    }
public function setAlpha($alpha)
    {
        $alpha = (float)$alpha;
        if($alpha < 0 || $alpha > 1) {
            throw new \UnexpectedValueException('value must be within [0, 1]');
        }
        $this->_alpha = $alpha;
    }
public function setAlpha ( $ alpha ) { $ alpha = ( float ) $ alpha ; if ( $ alpha < 0 || $ alpha > 1 ) { throw new \ UnexpectedValueException ( 'value must be within [0, 1]' ) ; } $ this -> _alpha = $ alpha ; }
alpha 0 => 100% transparency
alpha 1 => opaque, 0% transparency
alpha 0 = > 100% transparency alpha 1 = > opaque 0% transparency