public function color($key, $text)
    {
        $colorsEnabled = $this->configuration->areColorsEnabled() && $this->hasColorSupport();
        $colorsEnabledExplicit = $this->configuration->areColorsEnabledExplicit();

        if (!$colorsEnabled && !$colorsEnabledExplicit) {
            return $text;
        }

        $color = $this->colors[$key];

        return sprintf("%s%s%s", $color['left'], $text, $color['right']);
    }
public function color($key, $text)
    {
        $colorsEnabled = $this->configuration->areColorsEnabled() && $this->hasColorSupport();
        $colorsEnabledExplicit = $this->configuration->areColorsEnabledExplicit();

        if (!$colorsEnabled && !$colorsEnabledExplicit) {
            return $text;
        }

        $color = $this->colors[$key];

        return sprintf("%s%s%s", $color['left'], $text, $color['right']);
    }
public function color ( $ key , $ text ) { $ colorsEnabled = $ this -> configuration -> areColorsEnabled ( ) && $ this -> hasColorSupport ( ) ; $ colorsEnabledExplicit = $ this -> configuration -> areColorsEnabledExplicit ( ) ; if ( ! $ colorsEnabled && ! $ colorsEnabledExplicit ) { return $ text ; } $ color = $ this -> colors [ $ key ] ; return sprintf ( "%s%s%s" , $ color [ 'left' ] , $ text , $ color [ 'right' ] ) ; }
Given a color name, colorize the provided text in that
color

@param $key
@param $text
@return string
Given a color name colorize the provided text in that color