Short answer: Mac Mail gives you three ways to color-code email. Colored flags (Message > Flag) are the only colors that show up on your iPhone and iPad too. Rules can color messages automatically: Mail > Settings > Rules > Add Rule, then choose the action Set Color of Message and pick of background or of text. And you can color selected messages by hand with Format > Show Colors. To color-code by account, make a rule with the condition Account.
Steps are for macOS 27 and match macOS Tahoe 26, Sequoia 15 and Sonoma 14. Apple's current Mail guide only covers flags and rules in general terms, so where a step comes from an older Apple guide page or from Mail's own menus in macOS 27, we say so.
Which kind of color should you use?
| Method | What gets colored | Automatic? | Shows on iPhone and iPad? |
|---|---|---|---|
| Colored flags | A flag icon on the message, plus a Flagged mailbox per color | Yes, with a rule | Yes |
| Rule with Set Color of Message | The row background or the text in the message list | Yes | No, this Mac only |
| Format > Show Colors | The row background of the messages you select | No | No, this Mac only |
If you read mail on more than one device, flags are the safer choice. Background and text colors are a Mac-only layer: Apple says they're visible only on the Mac where you applied them.
Color-code emails with flags
Mail has seven flag colors: Red, Orange, Yellow, Green, Blue, Purple and Gray.
- Select one or more messages.
- Click the Flag button in the toolbar and choose a color, or choose Message > Flag and pick one. Command-Shift-L toggles a flag on or off.
- To remove it, choose Clear Flag from the same menu.
Flagged messages also appear in the Flagged mailbox in the sidebar. Once you use more than one color, the Flagged mailbox gets an arrow, and each color has its own sub-mailbox.
Give each flag color a meaning
Colors are much more useful when they mean something. Rename them:
- Click the arrow next to Flagged in the Mail sidebar.
- Click a flag name, click it again, then type a new name. For example, rename Red to Urgent and Blue to Waiting on reply.
Apple notes that flags you add appear on that message in Mail on all your Apple devices signed in to the same Apple Account, and on iPhone you can change a flag's color from the message too. We cover flags in more depth in our guide to flags in Mac Mail.
Use rules to color messages automatically
A rule can paint every message from your boss red, or every newsletter gray, the moment it arrives.
- Choose Mail > Settings, then click Rules.
- Click Add Rule and give it a description, such as Boss in red.
- Choose whether any or all of the conditions must be met, then set a condition. For example: From, contains, then your boss's address.
- Under Perform the following actions, choose Set Color of Message, then choose of background or of text.
- Pick a color from the menu, or choose Other to use the Colors window for any shade.
- Click OK, then choose whether to apply the rule to messages already in your mailboxes or only to new ones.
Some conditions that work well for color-coding, using the names they have in Mail's menus:
- From or Subject contains a word or address.
- Sender is VIP, or Sender is in my contacts.
- Priority is high (Apple's own example is a red background for high-priority mail).
- Account, to give each email account its own color (see below).
You can add a second action to the same rule, such as Mark as Flagged or Move Message, so a message gets a color and lands in the right place in one go.
Color-code emails by account
Mail doesn't have an account color setting, but a rule does the job. Make one rule per account:
- In Mail > Settings > Rules, click Add Rule.
- Set the condition to Account and choose the account, for example your work account.
- Set the action to Set Color of Message, of background (or of text), and pick a color.
- Repeat for your other accounts with different colors.
In All Inboxes you can then tell work from personal mail at a glance. Keep the colors pale if you use background color, or text gets hard to read.
Color messages by hand with Format > Show Colors
- Select one or more messages in the message list.
- Choose Format > Show Colors (Command-Shift-C).
- Click a color. Mail changes the background color of the selected messages in the list.
Apple documents this method up to macOS Sequoia 15. In macOS 27 the Format > Show Colors command is still in Mail's menu, but Apple's current guide no longer describes it. Apple doesn't document how to remove a color added this way, which is one more reason to prefer flags or rules.
Can you color mailboxes in the Mail sidebar?
No. We found no setting in macOS 27's Mail for coloring individual mailboxes or folders. The Folder color option in System Settings > Appearance applies to folders in the Finder, not to Mail's sidebar. Two things get close:
- Use flag colors. Each flag color gets its own sub-mailbox under Flagged, with the name you gave it.
- Make a Smart Mailbox with the condition Message has flag and a color. You can name it whatever you like, and it collects every message with that flag. Our guide to Smart Mailboxes in Mac Mail shows how.
Other places Mail uses color
- Conversation highlights. In Mail > Settings > Viewing, Highlight messages with color when not grouped colors the messages of one conversation when conversations are turned off. Click the color well to change the color.
- Quoted text. In Mail > Settings > Fonts & Colors, Color quoted text sets a color for each level of quoting in replies.
- Message background. In dark mode you can show emails on a light background. See dark mode in Apple Mail.
Why your color coding isn't working
- You're on another device. Background and text colors only show on the Mac that applied them. Use flags if you need color everywhere.
- The rule is off or below another rule. In Mail > Settings > Rules, make sure its checkbox is selected. Rules run in list order, so a rule above it with Stop evaluating rules can stop it from running. Drag it higher.
- The rule ran before you made it. Rules apply to new mail. Select existing messages and choose Message > Apply Rules to color them.
- Rules on another Mac. If you use iCloud Drive with Mail turned on, Apple says your rules are available on your other Macs, so a rule you delete on one Mac may still be at work on another.
If you want more than Mail offers
Disclosure: we make Canary Mail. Colors help you spot what matters, but you still have to build and maintain every rule. Canary's AI inbox sorting does that first pass for you. Canary Mail is an email app for Mac, iPhone, iPad, Windows and Android that works with Gmail, Outlook, iCloud, Yahoo, Exchange and other IMAP accounts. The free plan covers unlimited accounts on 2 devices with AI inbox sorting. The Growth plan ($36 a year) adds AI writing and summaries, read receipts, send later and a calendar on up to 5 devices. Tracker blocking is on by default, and your email isn't used to train AI. More than 2 million people use it, and Apple has featured it on the App Store and the Mac App Store.
Frequently asked questions
Can you color code emails in Apple Mail?
Yes. Use colored flags (Message > Flag), a rule with the action Set Color of Message, or Format > Show Colors for selected messages. Only flags show on your iPhone and iPad.
How do I color code accounts in Apple Mail?
Create one rule per account in Mail > Settings > Rules. Use the condition Account, then the action Set Color of Message, of background, and choose a different color for each account.
How do I make a rule that sets the color of a message?
Add a rule, set its conditions, then under Perform the following actions choose Set Color of Message, choose of background or of text, and pick a color. Click OK and apply it to existing messages if you want.
Do Mac Mail colors sync to iPhone?
Flags do: Apple says they appear on all your devices signed in to the same Apple Account. Background and text colors from rules or Format > Show Colors stay on the Mac.
How do I remove a color from a message?
For flags, choose Clear Flag. For a rule, turn the rule off in Mail > Settings > Rules. For colors applied by hand, Apple doesn't document a remove step, so flags and rules are easier to undo.
More Mac Mail how-tos
- Using flags in Mac Mail
- Smart Mailboxes in Mac Mail
- How to snooze emails in Apple Mail
- Dark mode in Apple Mail
- Customizing the Apple Mail toolbar
- Sorting messages in Mac Mail
Other Mac Mail fixes
- Mac Mail not opening or freezing
- Mac Mail keeps crashing
- Mac Mail not sending emails
- Messages stuck in the Outbox
- Mac Mail not receiving emails
- Mac Mail inbox not updating
- Mac Mail can't connect to the server
- "Unable to verify account name or password"
- Mac Mail not showing attachments
- Mac Mail not showing images
- Mac Mail search not working
Sources
- Apple Mail User Guide (macOS 27): Mark emails to revisit later
- Apple Mail User Guide (macOS 27): Change Rules settings
- Apple Mail User Guide (macOS Sequoia 15): Color-code emails
- Apple Mail User Guide (macOS 27): Change Viewing settings
- Apple Mail User Guide (macOS 27): Change Fonts & Colors settings
- Apple Mail User Guide (macOS 27): Automatically sort incoming emails (Smart Mailboxes)
- Apple Mac User Guide (macOS 27): Change Appearance settings
- Apple iPhone User Guide (iOS 27): Flag or block emails