BIOS color attributes

{{context|date=March 2013}}

{{Duplication|date=June 2025|dupe=VGA text mode}}

A BIOS Color Attribute also known as VGA text mode attribute is an 8 bit value where the low 4 bits represent the character color and the high 4 bits represent the background color. The name comes from the fact that these colors are used in BIOS interrupts, specifically INT 10h, the video interrupt. When writing text to the screen, a BIOS color attribute is used to designate the color to write the text in. For example, to print a white character with a black background, a color attribute of 0Fhex would be used. The high four bits are set to 0000bin, representing the background color, black. The low 4 bits, 1111bin, represent the foreground color, white. The highest bit of the color attribute, which is also the highest bit of the background color can take over two functions. It can either have no influence on the background color making text blink when set, effectively limiting the available background colors to only eight, or if intensive background colors are enabled the full 16 colors become available but blinking is no longer available. This behavior can be changed, i.e., using BIOS interrupt 10hex, function 1003hex. By default, when using the BIOS interrupt, the highest bit controls the brightness of colors, and not blinking, but this behavior may differ in other implementations of BIOS colors {{cn|date=December 2020}}. [http://www.ctyme.com/intr/rb-0117.htm Int 10h/AX=1003 Ralf Brown's Interrupt List, online version] This 16 colour palette is often used in console programs (e.g. {{Mono|cmd}} in Windows) and sometimes for chat in games (e.g. Minecraft).{{cite web |url=https://minecraft.wiki/w/Index.php?oldid=846419&title=Multiplayer#Chat |title=Multiplayer: Chat |date=11 June 2015 |work=Minecraft Wiki |access-date=24 September 2023 |language=en}}

List of BIOS color attributes

class = "wikitable"

!Dec

!Hex

!Binary

! colspan="2" | Color

0

| 0

| 0000

| Black

| style="background-color: #000000" |

1

| 1

| 0001

| Blue

| style="background-color: #0000AA" |

2

| 2

| 0010

| Green

| style="background-color: #00AA00" |

3

| 3

| 0011

| Cyan

| style="background-color: #00AAAA" |

4

| 4

| 0100

| Red

| style="background-color: #AA0000" |

5

| 5

| 0101

| Magenta

| style="background-color: #AA00AA" |

6

| 6

| 0110

| Brown

| style="background-color: #AA5500" |

7

| 7

| 0111

| Light Gray

| style="background-color: #AAAAAA" |

8

| 8

| 1000

| Dark Gray

| style="background-color: #555555" |

9

| 9

| 1001

| Light Blue

| style="background-color: #5555FF" |

10

| A

| 1010

| Light Green

| style="background-color: #55FF55" |

11

| B

| 1011

| Light Cyan

| style="background-color: #55FFFF" |

12

| C

| 1100

| Light Red

| style="background-color: #FF5555" |

13

| D

| 1101

| Light Magenta

| style="background-color: #FF55FF" |

14

| E

| 1110

| Yellow

| style="background-color: #FFFF55" |

15

| F

| 1111

| White

| style="background-color: #FFFFFF" |

By default, there are 16 colors for text and only 8 colors for background.

There is a way to get all the 16 colors for background, which requires turning off the "blinking attribute".

See also

References

{{reflist}}

{{DEFAULTSORT:Bios Color Attributes}}

Category:BIOS

Category:Color codes