Learn how to read the color picker column on monday boards using the platform API
The color picker column allows design teams to assign specific colors to items. After selecting a color, the column will display the relevant color code in the format of your choice. You can read the color picker column via the API, but you currently cannot filter, update, or clear it.
Read a color picker column
You can query the color picker column using the column_values object that enables you to return column-specific subfields by sending a fragment in your query. Values for the color picker column are of the ColorPickerValue type.
query {
items(
ids: [
1234567890
9876543210
]
) {
column_values {
... on ColorPickerValue {
color
updated_at
}
}
}
}import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });
const query = `query($itemIds: [ID!]) { items (ids:$itemIds) { column_values { value ... on ColorPickerValue { color updated_at } } } }`;
const variables = {
itemIds: [9571351485, 9572374902],
};
const response = await mondayApiClient.request(query, variables);Fields
| Field | Description |
|---|---|
color String | The column's HEX color value. |
column Column! | The column the value belongs to. |
id ID! | The column's unique identifier. |
text String | The column's value as text. Returns null if the column has an empty value. |
type ColumnType! | The column's type. |
updated_at Date | The column's last updated date. |
value JSON | The column's JSON-formatted raw value. |
