The combination of alternate{Foreground,Background}Semantics and {fg,bg}is24bit is incompatible. Instead of four 1-bit fields, let's use a pair of 2-bit fields taking values from an enum with values like ColorModeNormal=0, ColorModeAlternate=1, ColorMode24Bit=2.