Welcome! Log In Create A New Profile

Advanced

Console & Text Color?

Posted by pokeglobe 
Console & Text Color?
December 10, 2009 12:07AM
I know this is possible. I have done it before. I want to know how I can't change the console color to white and text to black.
I am having a really hard time with it. Even if I can get help making a half assed one...
Re: Console & Text Color?
December 10, 2009 03:32AM
I googled since I was somewhat interested.
[www.developer.com]
Might be useful. I pretty much just skimmed it.
Re: Console & Text Color?
December 10, 2009 10:24AM
You are looking for "ANSI escape sequences" (google should provide you what you need with that search term)
Re: Console & Text Color?
December 11, 2009 08:52PM
Download and take a look at Skinned Console Applications (Libraries/Source & Example)

There are classes in there that do exactly what you want along with a demo of how to use it.



Edited 1 time(s). Last edit at 12/11/2009 08:52PM by pembo.
Re: Console & Text Color?
December 12, 2009 06:00PM
I'm not sure if it is the same on the wii, and I'm guessing it's not, but OS development to write text to the screen you write to memory address 0xb8000 the first byte is the ASCII of the character, and the next byte is the backgroud color. The color is very specific, and not the same as an 8-bit.
Re: Console & Text Color?
December 13, 2009 09:49AM
try this

#define RESET		0
#define BRIGHT 		1
#define DIM		2
#define UNDERLINE 	3
#define BLINK		4
#define REVERSE		7
#define HIDDEN		8

#define BLACK 		0
#define RED		1
#define GREEN		2
#define YELLOW		3
#define BLUE		4
#define MAGENTA		5
#define CYAN		6
#define	WHITE		7

where attr is the attribute from the first set, fg is text color, and bg is conlose color

	printf("%c[%d;%d;%dm", 0x1B, attr, fg + 30, bg + 40);

Sorry, only registered users may post in this forum.

Click here to login