---
title: "getColorPickerColor"
canonical: "https://help.vicon.com/space/ShogunPost121/1253736960/getColorPickerColor"
format: markdown
---
# Description

Gets the color value of the color picker user control that is specified by `userControlID`.

The return value is a three element integer array, holding the red, green, and blue components of the selected color. Each component ranges in value from 0 to 255.

## Functional area

User Window

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getColorPickerColor userControlID` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `userControlId` | int | yes | ID of user control to operate on. |

### Flags

None

## Return value

integer array 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Get the color value of a Color Picker User Control
int $windowId;
int $controlId;
int $color[];
 
// First create a User Window to place the Controls on
$windowId = `createWindow "MyWindow"`;
// Create the User Control on the Window.
$controlId = `createColorPicker $windowId`;
// Get the default color
$color = `getColorPickerColor $controlId`;
print $color;
```

# Additional information

## Related commands

- [createColorPicker](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737103)
- [setColorPickerColor](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737444)
- [setColorPickerHandler](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737965)