PHP, CLI mostrar colores
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
<?
//*****************************************************************
// Flat Estrategia Digital <http://www.flat.cl/>
// <contacto@flat.cl>
//
// Description:
// Archivo que muestra en CLI colores, no funciona en navegador
//*****************************************************************
define(RED, "\x1B[31m");
define(GRN, "\x1B[32m");
define(YEL, "\x1B[33m");
define(BLU, "\x1B[34m");
define(MAG, "\x1B[35m");
define(CYN, "\x1B[36m");
define(WHT, "\x1B[37m");
define(RESET, "\x1B[0m");
printf(RED . "red\n" . RESET);
printf(GRN . "green\n" . RESET);
printf(YEL . "yellow\n" . RESET);
printf(BLU . "blue\n" . RESET);
printf(MAG . "magenta\n" . RESET);
printf(CYN . "cyan\n" . RESET);
printf(WHT . "white\n" . RESET);