Console foreground and background colours

Post Reply
vk2ktj
Posts: 1
Joined: Fri Nov 12, 2010 12:45 am

Console foreground and background colours

Post by vk2ktj » Sun Dec 22, 2013 7:01 am

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.

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Console foreground and background colours

Post by WinterMute » Fri Apr 04, 2014 1:24 pm

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.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests