In this document, we will take a quick look at the SimpleOutputProtocol in UEFI and the basic TUI that it enables in UEFI Applications.
To better understand it, we examine the UEFI Specification and the EDK II source code for SimpleOutputProtocol
In the UEFI spec, all console protocols are covered in chapter 12*,* which we can see from the table of contents.

The protocol interface is defined as follows

In particular, the SetAttribute parameter is of interest, since it can be used to set the foreground and background color of the text. Below is the prototype and possible values of the Attribute, which is the second arg

OutputString() methodThis method is used to output an existing string (CHAR16) to the output device. It is quite trivial:

SimpleOutputProtocol is related to Print() from uefilib LibrarySimpleOutputProtocolSimpleOutputProtocol and takes advantage of Unicode characters and colours