Attr

Text attributes that do not include color.

Values

ValueMeaning
none0

normal, plain text

bold1 << 0
reverse1 << 2

foreground and background colors reversed

dim1 << 3
italic1 << 4
strikethrough1 << 5
underline1 << 6

Underlines are a bit field, because they can be styled. Use a ^= underlineMask; a |= plainUnderline. If you only use simple underlines you can just set underline as a bool.

plainUnderlineunderline | 0 << 7
doubleUnderlineunderline | 1 << 7
curlyUnderlineunderline | 2 << 7
dottedUnderlineunderline | 3 << 7
dashedUnderlineunderline | 4 << 7
underlineMaskunderline | 7 << 7
invalid1 << 15
initinvalid

Meta