A Complete Guide to .clr Palette Files (Apple Color List)

Everything you need to know about how to create, open, use, and convert .clr palette files

5 min read/Jul 22, 2023
Apple color list

What are .clr Palette Files?

.clr files, short for "Apple Color List", play an essential role in storing color palettes on MacOS and is what the native Mac color picker uses. These files end with the extension .clr and enable the use of color palettes in various applications like Pages, XCode, and more. In essence, .clr files store a collection of colors paired with corresponding names. They are just a simple way to store a color palette, the Mac way.

How do I open .clr files?

.clr files can't be opened directly, however, the native Mac color picker can open them, along with various third party Mac apps.

To open a .clr file on Mac, first open the system color picker from one of your apps. Click the three dots on the palette page and choose "Open...". From there you can choose your .clr palette to import it.

Opening a .clr file on Mac
Apple System Color Picker

How Do You Create and Edit .clr Files?

There are three primary ways to create .clr files:

Create .clr palettes with the Mac color picker

The native Mac color picker stores its palettes as .clr files, providing a native way to create them. However, it lacks a direct export option. Weird right? With that said, once you have a color palette in the native color picker, you can find its corresponding .clr file in your library folder which we show how to access below.

Using a third-party color picker

For those seeking a better way, a third-party color picker can make creating .clr palettes a breeze, plus you can usually export your palettes to other formats as well. Below, we'll show you how to create a color palette and export it to .clr with ColorSlurp.

  1. Create a palette Open ColorSlurp and head over to the palettes page. Click on the new palette button, then add colors to it by clicking on the "New Color" button. Add and edit colors until you have the perfect palette! One neat feature of ColorSlurp is its ability to pick colors from your screen and add them to your palette with just one click!
Create and edit a color palette with ColorSlurp
  1. Create the .clr palette Once you're happy with your palette, press the export button, and from the dropdown menu that appears select the .clr format. Just like that, your .clr palette is ready to be used! ColorSlurp's seamless palette export allows you to focus on creating beautiful palettes while providing the freedom to export to various formats, not just .clr.
Export a palette as .clr

Create .clr files through code using NSColorList

For the nerds, beneath the surface .clr files are actually the serialized class NSColorList. NSColorList functions as a key-value store, containing the color name and its associated NSColor value. You can easily create and open .clr files using Swift. Below is a simple example to get you started:

import Cocoa

// Create a color list
let filePath = "./your-file.clr"
let list = NSColorList(name: "My Palette")
        
// Add colors to the color list
colorList.setColor(NSColor.red, forKey: "Red")
colorList.setColor(NSColor.green, forKey: "Green")
colorList.setColor(NSColor.blue, forKey: "Blue")

try? list.write(to: filePath)

// Read a color list 
if let colorList = NSColorList.init(name: "My Palette", fromFile: filePath) {
    for key in colorList.allKeys {
        if let color = colorList.color(withKey: key) {
            print(key, color)
        }
    }
}

How do I convert .clr files to other formats?

While .clr files are mostly used with the Apple Color Picker on Mac, you might want to use those palettes in different applications or design software that use a different format. ColorSlurp lets you convert .clr palettes to different formats lickety split!

Here's how to convert a .clr palette to another format, such as .ase:

  1. Import Your .clr Palette: Launch ColorSlurp and locate the "Palettes" tab. Drag and drop your .clr file anywhere into the window to import it into the application. Once your palette is imported, click on it and press the export button.
Importing a .clr palette to convert it
  1. Choose Your Format: Upon clicking "Export," a list of available formats will appear. ColorSlurp offers a wide range of options such as .ase, plain text, JSON, and more. Select the format that best suits your needs.
  2. Export: Click "Export", and ColorSlurp will instantly convert your .clr palette. The converted palette is now ready for use in any software of your choice!
Exporting a palette to .ase

Where do I find the Apple Color Picker palettes?

To locate all the palettes you've created using Apple's color picker, navigate to the following directory: ~/Library/Colors. Note that the library folder is hidden on Mac by default. To reveal it, simply use the "Go" menu in Finder and hold down the Option key, then select "Library."

If you want to move your palettes to another Mac, you can easily do so by copying them over to the same Colors folder on the other machine."

Can I use .clr files on non-Apple operating systems or iOS?

No, it is not possible to use .clr files outside of Mac. These files are specifically associated with Mac and Apple's Color Picker, which is a MacOS-exclusive feature.

If you need to work with color palettes on other platforms such as Windows or iOS devices, you'll need to convert the .clr files to a different format, such as .ase, or plain hex codes. Alternatively, you can use online tools or applications that are cross-platform.

Can my Apple Color Picker palettes be synced across my Macs?

Unfortunately not easily, although can manually transfer them to your other Macs. The good news is that there are apps like ColorSlurp that can sync your palettes across all of your devices in real time.

How do I export .clr files from the Mac Color Picker?

There's no direct way to export them, however all of your palettes can be found in your library folder as explained above


That's it!