Page 1 of 1

Console foreground and background colours

Posted: Sun Dec 22, 2013 7:01 am
by vk2ktj
Hi,
I'm a relative newbie to devkitpro and am learning as I go.

I'm stuck on something seemingly simple and I'm hoping for some assistance from someone willing to share.

I am interested in making using of the Console and I have some simple programs running that have taught me the basics of using them. Where I'm stuck is on font colours. At present I can only print to the console in white on black. I'd assumed that the references to an ANSI console meant that I could use the ANSI escape sequences to set foreground and background colour but these do not appear to work, instead they're just printed literally to the console, apparently not parsed.

I see in console.h references to font color, but it's unclear to what these actually do or how I use them. None of the examples demonstrate what I'm after and while Google is my friend it's being uncooperative on this point.

Can someone offer me some insight into how I print to the console in colors other than white?

thanks.

Re: Console foreground and background colours

Posted: Fri Apr 04, 2014 1:24 pm
by WinterMute
There are some examples of using the escape sequences in https://sourceforge.net/p/devkitpro/nds ... /Printing/ although I can't see any that change colors atm. You can definitely change the foreground color but not the background color at present.