yii\console\Controller::isColorEnabled PHP Method

isColorEnabled() public method

ANSI color is enabled only if [[color]] is set true or is not set and the terminal supports ANSI color.
public isColorEnabled ( resource $stream = STDOUT ) : boolean
$stream resource the stream to check.
return boolean Whether to enable ANSI style in output.
    public function isColorEnabled($stream = \STDOUT)
    {
        return $this->color === null ? Console::streamSupportsAnsiColors($stream) : $this->color;
    }