Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| <?php | |
| //@NabiKAZ | |
| //https://gist.github.com/NabiKAZ/91f716faa89aab747317fe09db694be8 | |
| //For show advanced list of files and directories with sort, date, size, icon type,..., | |
| //Save bellow content code as route.php file, and then run this command: | |
| // php -S 0.0.0.0:8080 -t . route.php | |
| //And then open http://localhost:8080/ in the browser. | |
| ////////////////////////////////////////////////////////////////// | |
| // This block MUST be at the very top of the page! | |
| @ob_start('ob_gzhandler'); |
| class Colorcodes(object): | |
| """ | |
| Provides ANSI terminal color codes which are gathered via the ``tput`` | |
| utility. That way, they are portable. If there occurs any error with | |
| ``tput``, all codes are initialized as an empty string. | |
| The provides fields are listed below. | |
| Control: |