src/ConsoleColor.php
protected function parseColor($color, $code = null)
    {
        $colors = is_array($color) ? $color : [$color => $code];
        $return = [];

        array_walk($colors, function ($code, $color) use (&$return) {
            $color = $this->snakeCase($color);
            $return[$color] = $code;
        });

        return $return;
    }
protected function parseColor($color, $code = null)
    {
        $colors = is_array($color) ? $color : [$color => $code];
        $return = [];

        array_walk($colors, function ($code, $color) use (&$return) {
            $color = $this->snakeCase($color);
            $return[$color] = $code;
        });

        return $return;
    }
protected function parseColor ( $ color , $ code = null ) { $ colors = is_array ( $ color ) ? $ color : [ $ color => $ code ] ; $ return = [ ] ; array_walk ( $ colors , function ( $ code , $ color ) use ( & $ return ) { $ color = $ this -> snakeCase ( $ color ) ; $ return [ $ color ] = $ code ; } ) ; return $ return ; }
Parse the color.

@param string|array $color
@param int|null     $code

@return array
Parse the color .