Determines whether a terminal supports color.
#include <curses.h>
has_colors()
The has_colors subroutine determines whether a terminal supports color. If the terminal supports color, the has_colors subroutine returns TRUE. Otherwise, it returns FALSE. Because this subroutine tests for color, you can call it before the start_color subroutine.
The has_colors routine makes writing terminal-independent programs easier because you can use the subroutine to determine whether to use color or another video attribute.
Use the can_change_colors subroutine to determine whether a terminal that supports colors also supports changing its color definitions.
To determine whether or not a terminal supports color, use:
has_colors();
This routine is part of Base Operating System (BOS) Runtime.
Curses Overview for Programming in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
List of Curses Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
Manipulating Video Attributes in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.