private static function parseAlpha($input, &$result)
    {
        if ($input === null ||
            $input === ''
        ) {
            $result = 1;
            return true;
        }
        
        if (preg_match('/^\\s*(\\d*(?:\\.\\d*)?)(%?)\\s*$/', $input, $matches)) {
            $result = floatval($matches[1]);
            
            // Percentage
            if ($matches[2] !== '') {
                $result = $result / 100;
            }
            
            if ($result < 0) $result = 0;
            if ($result > 1) $result = 1;
            
            return true;
        }
        
        return false;
    }