Color Picker

Last Updated 06.05.03

General Description

The color picker component allows a user to pick a color for an object or component in the page.
For example, the color picker could be used to pick the color of a bar in a graph.

Guideline Attributes

Spec Version# - 3.1
Spec Contributors - Nina Gilmore, Dan Workman
UI Models - All Models
Example Products - All Products
Related Guidelines - Date Picker, , Inline Messaging and Tips Guideline, Button (Action/Navigation) Guideline , Content Layout Guideline

Table of Contents

Interaction and Usage Specifications

General Principles

Inline Color Picker

The inline color picker (in the primary page contents) works well when customizing color information is a crucial part of the task at hand, and space exists in the primary page to place the color palettes inline. Each customizable object field must use a separate color palette.

Color Picker - Inline (single color picker)

Color Picker in Secondary Window

The color picker in a secondary window is useful when color customization is not a user's primary task, and/or when objects have default colors that are not often customized. It is also useful in instances where the primary page is dense with information, and adding inline palettes would add too much clutter to the screen.

Color Picker - Inline Text Field and Swatch


Color Palette - In Secondary Window

(Note: the secondary window must be modal to ensure that the window retains focus and does not get hidden behind the primary window.)

Color Picker - Inline (multiple color pickers)

Interaction Heuristics

General

Colorpicker Inline

Colorpicker in Secondary Window

Creating Custom Colors

A user can edit color information in the text field. This will create a custom color.

General Heuristics for Custom Colors

Colorpicker Inline

Typing a color value into the text field in the primary page creates a custom color.
When a user types a color value into the text field, the color swatch following the text field updates to display the custom color when focus leaves the field.
The custom color row in the inline palette also updates (when focus leaves the field) to show the custom color in the first available space. Custom colors are filled left to right in the custom color row.

Custom Colors Inline

Secondary window

Typing a color value into the text field in the secondary window creates a custom color.
When a user types a color value into the text field, the color swatch following the text field updates to display the custom color (when the field loses focus.) When the user clicks "Apply", the secondary window closes and the custom color is applied to the field in focus on the primary page.

In the secondary window, the custom color row updates with the custom color in the first available space and the next time that the secondary window color picker is opened, the custom color is visible. Custom colors are filled left to right in the custom color row.

(When a user types a custom color into a text field on the primary page without launching the color picker window, the custom color is still created. The next time the color picker is launched, the custom color appears.)

Custom Colors in Secondary Window

Formatting Error Messaging

Error messages make it possible for the user to know when they’ve typed an invalid color format into the colorpicker field.

Inline

If a user types an invalid color format into the primary page text field and attempts to tab or click out of the field, a javascript alert warns the user that the format is invalid. Error text must indicate the proper color format (based on the application) in hexadecimal or RGB value: “Color must be entered in the following format: [#FFFFFF]." When the user clicks "OK" in the alert window, the field on the primary page is reset to its previous value and focus returns to the field.

When the user enters a color in the appropriate format into the text field on the primary page, the color swatch will update upon exiting the field.

Secondary Window

If a user types an invalid color format into the secondary page text field and attempts to tab or click out of the field, a javascript alert will warn the user that they have typed an invalid format. Error text must indicate the proper color format appropriate to the application in hexadecimal or RGB value: “Color must be entered in the proper format. (Example #FFFFFF)".

When the user clicks "OK", the field is reset to the previous value in the field, and focus is returned to the field.
The user can choose to edit the field again or click "Cancel" to dismiss the secondary window without making any changes to the primary page.

Color Palettes

Choosing a color palette should be based on the task and the needs of the users, helping them accomplish their tasks without confusing or distracting them. In most instances this means using the palette with the fewest colors. Use the heuristics below to determine which palette to choose. 49-color (Default)


72-color palette


143-color palette

Color Picker Flows

Secondary Window Flow

The color picker secondary window page flow is described visually below. When the color swatch icon is selected, the color picker will open in a secondary window at X, Y position 270, 200. The smallest effective palette should be used.
Color Picker in Secondary Window
Page Flow Color Picker

Error Messaging (consistent for both inline and secondary window)

The color picker formatting error messaging flow is described visually below. If a user types an invalid entry into the color picker text field, a JavaScript alert will tell the user of the proper format and return focus to the field when the user clicks "OK".

Color picker error messaging
Page Flow Error Messaging

Visual Specifications



Visual Specifications Secondary Window Color Picker

Open/Closed Issues

Open Issues