When the screen is 8 bits deep, the BColorControl object presents users with a matrix of the 256 available colors. The user chooses a color by pressing the primary mouse button while the cursor is over one of the cells in the matrix. Dragging from cell to cell changes the selected color. The arrow keys can similarly change the selection when the object is the focus view. The BColorControl's value changes each time the selection does.
When the screen is 15, 16, or 32 bits deep, the BColorControl object displays ramps for each color component. The user changes the current color by modifying a red, green, or blue component value.
In addition to the color matrix and ramp, a BColorColor has three text fields where the user can set a color by typing in its red, green, and blue component values. The text fields (BTextControl objects) are children of the BColorControl.
| Field | Type code | Meaning |
|---|---|---|
| "_layout" | B_INT32_TYPE | The layout of the matrix of 256 color cells. |
| "_csize" | B_FLOAT_TYPE | Size of a single cell in the matrix of 256 color cells. |
| "_use_off" | B_BOOL_TYPE | Whether the control uses buffered drawing. |
| Name | Level | Meaning |
|---|---|---|
| "_red" | 0 | BTextControl for the "red" field. |
| "_green" | 0 | BTextControl for the "green" field. |
| "_blue" | 0 | BTextControl for the "blue" field. |