Last Updated on September 19, 2024
Want to create those shiny colorful folders?
In this guide, I will show you how to easily create colored folders (and change their colors) in both SharePoint and OneDrive.
Let’s get started!
Table of Contents:
How to Create Colored Folders
You may have seen the changes in the last quarter of 2023 where there’s an additional option when creating folders.
That’s because the rollout for folder colors in SharePoint and OneDrive started in August 2023, as you can see here.
The good part is that it’s really easy to create these colored folders. 🙂
👉 Related: SharePoint Library vs Folder: Stay Away From Folders
Basically, you simply have to create a folder the normal way:
- Go to the SharePoint document library
- Click the new button > folder option

From here, you simply need to click the color you want to apply to the new folder.
After clicking the create button, you will then see the new colored folder:

Easy, right? 😎
👉 Related: How to Create a Password-Protected Folder in SharePoint
2. OneDrive
The steps are the same in OneDrive:
- Go to where you want to create a new folder
- Click the add new button > folder option

Name it and then:
- Select the folder color
- Click the create button

No differences at all with the steps in SharePoint Online. 🙂
Sign up for exclusive updates, tips, and strategies
How to Change the Colors of the Folders
But can you change the color of a pre-existing folder?
Yes! You can change the color of existing folders even the ones created even before the colored folders update rolled out.
Bring out the context menu of the target folder by either of the following options:
- Right-click the folder (simplest)
- Click the vertical ellipsis
From the choices, go to folder color > select the color you want to apply:

Right after you click on the color, the change will take effect immediately.
By the way, the same steps apply when changing the color of a folder in OneDrive.
Using Powershell to Create Colored Folders
Powershell can do a lot of things, and even more than what the front user interface can achieve.
If you want to use Powershell for this, you can use the following script:
# Set Variables
$siteUrl = "https://yourtenanthere.sharepoint.com/sites/sitenamehere"
$documentLibrary = "nameoflibrary"
$folderName = "nameoffolder"
$folderColor = 3
try {
# Connect to SharePoint site
Connect-PnPOnline -Url $siteUrl -Interactive -ErrorAction Stop
# Create the folder
$newFolder = Add-PnPFolder -Name $folderName -Folder $documentLibrary -ErrorAction Stop
# Get the created folder item
$newFolderItem = Get-PnPListItem -List $documentLibrary -UniqueId $newFolder.UniqueId -ErrorAction Stop
# Change the value of the _ColorHex column of the created folder to change the color
Set-PnPListItem -List $documentLibrary -Identity $newFolderItem.Id -Values @{"_ColorHex" = $folderColor } -ErrorAction Stop
Write-Host "Folder created and color changed successfully." -ForegroundColor Green
Write-Host "Folder URL: $siteUrl/$documentLibrary/$folderName" -ForegroundColor Green
}
catch {
Write-Host "An error occurred: $_" -ForegroundColor Red
}
finally {
# Disconnect from SharePoint site
Disconnect-PnPOnline
}
For the folder color numbers, you can refer to the following table:
Color Hex Value | Color |
Empty or 0 | Yellow (default) |
1 | Dark red |
2 | Dark orange |
3 | Dark green |
4 | Dark teal |
5 | Dark blue |
6 | Dark purple |
7 | Dark pink |
8 | Grey |
9 | Light red |
10 | Light orange |
11 | Light green |
12 | Light teal |
13 | Light blue |
14 | Light purple |
15 | Light pink |
Got any questions about creating colored folders in SharePoint Online and OneDrive? Leave a comment.
For any business-related queries or concerns, contact me through the contact form. I will reply asap. 🙂
If you are using PNP Site templates, this is the way to provision folders with a colored icon