---
title: "color.convert: Convert Color — Vector kit command — Kition"
description: "Converts a colour to RGB, CMYK, grey or Lab through the working spaces and answers its values, hex and whether it is out of gamut."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/color.convert"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/color.convert](https://developer.kition.ai/docs/kits/vector/commands/color.convert)

# color.convert

**Convert Color.** Converts a colour to RGB, CMYK, grey or Lab through the working spaces and answers its values, hex and whether it is out of gamut.

- Kit: Vector 0.1.0 (.kvector); reference: [Vector kit commands](https://developer.kition.ai/docs/kits/vector.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `color` | `string` | no |  |
| `intent` | `"perceptual" \| "relative" \| "saturation" \| "absolute"` | no |  |
| `to` | `"rgb" \| "cmyk" \| "gray" \| "lab"` | no |  |

## Call through vector_run

```text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "color.convert" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `color`, `intent`, `to`. vector_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `deltaE` | `any` | no |  |
| `hex` | `any` | no |  |
| `lab` | `any[]` | no |  |
| `model` | `any` | no |  |
| `outOfGamut` | `any` | no |  |
| `values` | `any` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "deltaE": {},
    "hex": {},
    "lab": {
      "type": "array"
    },
    "model": {},
    "outOfGamut": {},
    "values": {}
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "color": {
      "type": "string"
    },
    "intent": {
      "enum": [
        "perceptual",
        "relative",
        "saturation",
        "absolute"
      ],
      "type": "string"
    },
    "to": {
      "enum": [
        "rgb",
        "cmyk",
        "gray",
        "lab"
      ],
      "type": "string"
    }
  },
  "returns": "{model, values, hex, lab: [L,a,b], outOfGamut, deltaE}",
  "type": "object"
}
```

Generated from the command list of @kition/vector-darwin-arm64@0.1.0 and the kit itself (vector_commands through @kition/cli@0.1.1, built from KitionAI/kition-vector@7cf908f).
