I have an intel based embedded target system and Linux is running.
I saw that kernel commands' font color of screen output (in telnet-console) is adjusted automatically. For example, if xterm console background is light color, texts are black, and for black background console, texts are white.
I uploaded my application in c and run on the Linux prompt. Font color is fixed black so that I cannot see any printf messages on the black background xterm.
Can anyone tell me how to adjust in c program dynamically?
Check this site for color codes: http://misc.flogisoft.com/bash/tip_colors_and_formatting
And here is an example how you can use it.
int
arraysforeground
andbackground
are color codes for foreground and background that I found in table on the site I gave you.Have fun :)