PHP-Console-Color

isSupported()) {
        echo "did not support color\n"; exit;
    }
    if (!$ccolor->isSupported()){
        echo "did not support color\n"; exit;
}
    if (!$ccolor->are256ColorsSupported()){
        echo "did not support 256 color mode\n"; exit;
}

// write name space class name ---
    $con = new JakubOnderka\PhpConsoleColor\ConsoleColor();
// display stye which is supported
    foreach ($ccolor->getPossibleStyles() as $i => $style){
        echo "[".$ccolor->apply($style, $style)."]";
}
    for ($i = 1; $i <= 255; $i++){
        echo $con->apply("color_$i","*");
        echo $con->apply("bg_color_$i","*");
}
    echo "\n";