Simple_text_output.setattribute(), Setattribute() – Intel Extensible Firmware Interface User Manual
Page 313

Protocols
— Console Support
Version 1.10
12/01/02
10-19
SIMPLE_TEXT_OUTPUT.SetAttribute()
Summary
Sets the background and foreground colors for the
functions.
Prototype
EFI_STATUS
(EFIAPI *EFI_TEXT_SET_ATTRIBUTE) (
IN
SIMPLE_TEXT_OUTPUT_INTERFACE
*This,
IN
UINTN
Attribute
);
Parameters
This
A pointer to the
instance.
Type
SIMPLE_TEXT_OUTPUT_INTERFACE
is defined in the
“Related Definitions” section of Section 10.3.
Attribute
The attribute to set. Bits 0..3 are the foreground color, and bits 4..6 are
the background color. All other bits are undefined and must be zero.
See “Related Definitions” below.
Related Definitions
//*******************************************************
// Attributes
//*******************************************************
#define EFI_BLACK
0x00
#define EFI_BLUE 0x01
#define EFI_GREEN
0x02
#define EFI_CYAN 0x03
#define
EFI_RED
0x04
#define EFI_MAGENTA
0x05
#define EFI_BROWN
0x06
#define EFI_LIGHTGRAY
0x07
#define EFI_BRIGHT
0x08
#define EFI_DARKGRAY
0x08
#define EFI_LIGHTBLUE
0x09
#define EFI_LIGHTGREEN
0x0A
#define EFI_LIGHTCYAN
0x0B
#define EFI_LIGHTRED
0x0C
#define EFI_LIGHTMAGENTA
0x0D
#define EFI_YELLOW
0x0E
#define EFI_WHITE
0x0F