Here is an updated version of the serial color patch.
Compared to the previous patch:
* serial_set_color takes explicit foreground and background color numbers.
* The need to output color escape sequences is determined from the color pair number, not the color content of a given pair. This eliminates the possibbility of obtaining incorrect colors after \e[m (e.g. bold to non-bold transition) on terminals where the default color is not white on black.
* doxygen comment added to serial_set_color
* Foreground and background colors of a color pair are extracted with pair_content(), instead of relying on explicit bitmasking and shifting. Improves readability and removes some code duplication.
Build and runtime tested with coreinfo+libpayload+coreboot-v3 under QEMU.
/ulf