Color....

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
vbbrett

Color....

Post by vbbrett »

Colors.... Terrible things. I was considering building a Windows program to let you choose color, blinking, ect and then give you an equivalent hexadecimal value, but now that I look into it I realize I don't understand how the attribute byte is determined.

I read somewhere that the following is true.

B F F F I B B B

Where B is blinking.
F is foreground
I is intensity.
B is background

But when I test out a value such as
11110000

I get a nonblinking black text on white background. What's wrong?
Could I get some proven examples of some colors?
Brett
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Color....

Post by Pype.Clicker »

there are actually two 'interpretation' of the high-bit in text mode. It can either be the 'blinking' bit or the 'background high-intensity bit', depending on some VGA internal state ...

I guess there's some bit somewhere in some VGA register (i'd say in the attribute controller, but that's not for sure) that tells which one should be used... and if you don't set it yourself, well, you're bound to BIOS defaults :P
Post Reply