3. Flag Color Keywords
3. Flag Color Keywords
3.1. Definition of the $MailFlagBit_ Message Keywords
IMAP defines the \Flagged system flag to mark a message as urgent or needing special attention. The $MailFlagBit0, $MailFlagBit1, and $MailFlagBit2 keywords form a three-bit pattern that lets a flagged message carry one of seven flag colors.
| Bit 0 | Bit 1 | Bit 2 | Color |
|---|---|---|---|
| 0 | 0 | 0 | red |
| 1 | 0 | 0 | orange |
| 0 | 1 | 0 | yellow |
| 1 | 1 | 0 | green |
| 0 | 0 | 1 | blue |
| 1 | 0 | 1 | purple |
| 0 | 1 | 1 | gray |
The 111 combination is not assigned a color. These keywords MUST be ignored if the \Flagged system flag is not set. A client that understands these keywords MUST clear all three when the user clears \Flagged, and MUST NOT set them unless \Flagged is already set or is being set. Servers MAY clear the keywords when \Flagged is cleared. Clients SHOULD provide alternatives for users who cannot perceive colors, such as shapes, patterns, labels, or audio cues.
3.2. Implementation Notes
See the requirements above for client and server behavior when \Flagged or the flag color keywords are changed.