Home > PHP > Function > Ncurses > ncurses_has_colors()

ncurses_has_colors()

ncurses_has_colors - Checks if terminal has color capabilities

Syntax

bool ncurses_has_colors ()

Arguments

-

Description

Checks whether the terminal has color capabilities. This function can be used to write terminal-independent programs. ncurses must be initialized using ncurses_init() before calling this function.

Version

PHP 4.0.7, 5 < 5.3.0, PECL ncurses >= 1.0.0

Return value

Return TRUE if the terminal has color capabilities, FALSE otherwise.