Return to the Alphabetic Index
Return to the Class Browser
Return to the Picture Browser
Copyright (c) 1994 by NeXT Computer, Inc. All Rights Reserved.

NSColorList

Inherits From: NSObject

Conforms To: NSCoding NSObject (NSObject)

Declared In: AppKit/NSColorList.h

Class Description

Instances of NSColorList are used to manage named lists of NSColors. NSColorPanel's list-mode color picker uses instances of NSColorList to represent any lists of colors that come with the system, as well as any lists created by the user. An application can use NSColorList to manage document-specific color lists, which may be added to an application's NSColorPanel using its attachColorList: method.

An NSColorList is similar to a dictionary object: An NSColor is added to, looked up in, and removed from the list by specifying its key, which is an NSString. In addition, colors can be inserted at specified positions in the list. The list itself has a name, specified when you create the object (using either initWithName: or initWithName:fromFile:).

An NSColorList saves and retrieves its colors from files with the extension .clr in directories defined by a standard search path. To access all the color lists in the standard search path, use the availableColorLists method; this returns an array of NSColorLists, from which you can retrieve the individual color lists by name.

NSColorList reads color list files in several different formats; it saves color lists using the archiver API.

Initializing an NSColorList

Getting All Color Lists

Getting a Color List by Name

Managing Colors by Key

Editing

Writing and Removing Files