Office.MailboxEnums.CategoryColor enum
Specifies the category color.
Remarks
Applicable Outlook mode: Compose or Read
Important: The actual color depends on how the Outlook client renders it. In this case, the colors noted on each preset apply to Outlook on the web, on Windows (new and classic), and on Mac (starting in Version 16.78).
Earlier versions of Outlook on Mac had a bug that displayed incorrect preset colors. This has now been fixed starting in Version 16.78. If you've recently updated your Outlook client, you need to adjust the category colors in your add-in to match the updated preset values.
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/45-categories/work-with-master-categories.yaml
const masterCategoriesToAdd = [
{
displayName: "TestCategory",
color: Office.MailboxEnums.CategoryColor.Preset0
}
];
Office.context.mailbox.masterCategories.addAsync(masterCategoriesToAdd, function(asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
console.log("Successfully added categories to master list");
} else {
console.log("masterCategories.addAsync call failed with error: " + asyncResult.error.message);
}
});
Fields
None | Default color or no color mapped. |
Preset0 | Red |
Preset1 | Orange |
Preset2 | Brown |
Preset3 | Yellow |
Preset4 | Green |
Preset5 | Teal |
Preset6 | Olive |
Preset7 | Blue |
Preset8 | Purple |
Preset9 | Cranberry |
Preset10 | Steel |
Preset11 | DarkSteel |
Preset12 | Gray |
Preset13 | DarkGray |
Preset14 | Black |
Preset15 | DarkRed |
Preset16 | DarkOrange |
Preset17 | DarkBrown |
Preset18 | DarkYellow |
Preset19 | DarkGreen |
Preset20 | DarkTeal |
Preset21 | DarkOlive |
Preset22 | DarkBlue |
Preset23 | DarkPurple |
Preset24 | DarkCranberry |
Office Add-ins