---
title: "file.documentColorMode: Document Color Mode — Vector kit command — Kition"
description: "Switches the document between CMYK and RGB, converting every colour, symbol, pattern and swatch through the colour settings."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/file.documentColorMode"
---

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

# file.documentColorMode

**Document Color Mode.** Switches the document between CMYK and RGB, converting every colour, symbol, pattern and swatch through the colour settings.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `black` | `any` | no | to CMYK, RGB greys with R = G = B go on the black plate only, K = their grey value; one of several alternative parameters |
| `convert` | `boolean` | no | convert every colour of the art, symbols, pattern tiles and swatches through the colour settings; swatch links kept; Gray colours stay Gray, on the black plate |
| `grays` | `string` | no | like profile; default: RGB greys separate through the CMYK profile like any colour, into four-colour greys and a rich black; one of several alternative parameters |
| `intent` | `"perceptual" \| "relative" \| "saturation" \| "absolute"` | no |  |
| `mode` | `"cmyk" \| "rgb"` | no |  |

## Call through vector_run

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

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

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "black": {
      "description": "to CMYK, RGB greys with R = G = B go on the black plate only, K = their grey value; one of several alternative parameters"
    },
    "convert": {
      "default": true,
      "description": "convert every colour of the art, symbols, pattern tiles and swatches through the colour settings; swatch links kept; Gray colours stay Gray, on the black plate",
      "type": "boolean"
    },
    "grays": {
      "description": "like profile; default: RGB greys separate through the CMYK profile like any colour, into four-colour greys and a rich black; one of several alternative parameters",
      "type": "string"
    },
    "intent": {
      "enum": [
        "perceptual",
        "relative",
        "saturation",
        "absolute"
      ],
      "type": "string"
    },
    "mode": {
      "enum": [
        "cmyk",
        "rgb"
      ],
      "type": "string"
    }
  },
  "returns": "{changed}",
  "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).
