---
title: "drawing.format: Format Drawing Objects — Doc kit command — Kition"
description: "Changes the fill, stroke or geometry of drawing objects by id."
canonical: "https://developer.kition.ai/docs/kits/doc/commands/drawing.format"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/doc/commands/drawing.format](https://developer.kition.ai/docs/kits/doc/commands/drawing.format)

# drawing.format

**Format Drawing Objects.** Changes the fill, stroke or geometry of drawing objects by id.

- Kit: Doc 0.1.0 (.docx); reference: [Doc kit commands](https://developer.kition.ai/docs/kits/doc.md)
- Changes the document: yes
- Acts on: `ids` (a list of ids), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `effects` | `object` | no | read by the command beside its listed parameters |
| `fill` | `string \| object` | no | the shape's fill |
| `geometry` | `object` | no | {preset, adjust?: {adj…: value}} or {paths: […]} |
| `id` | `integer \| string` | no | read by the command beside its listed parameters |
| `ids` | `integer[]` | no |  |
| `stroke` | `object` | no | the outline: {color?, width? (pt), dash?} or {none: true} |

## Call through doc_run

```text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "drawing.format" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `effects`, `fill`, `geometry`, `id`, `ids`, `stroke`. doc_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": {
    "effects": {
      "additionalProperties": true,
      "description": "read by the command beside its listed parameters",
      "type": "object"
    },
    "fill": {
      "description": "the shape's fill",
      "oneOf": [
        {
          "description": "a colour: \"#rrggbb\" or a theme slot such as \"accent1\"; \"none\" for no fill",
          "type": "string"
        },
        {
          "additionalProperties": true,
          "description": "{color}, {gradient} or {none: true}",
          "type": "object"
        }
      ]
    },
    "geometry": {
      "additionalProperties": true,
      "description": "{preset, adjust?: {adj…: value}} or {paths: […]}",
      "type": "object"
    },
    "id": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Inline"
      ]
    },
    "ids": {
      "items": {
        "description": "an id",
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Inline"
      ]
    },
    "stroke": {
      "additionalProperties": true,
      "description": "the outline: {color?, width? (pt), dash?} or {none: true}",
      "type": "object"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/doc-darwin-arm64@0.1.0 and the kit itself (doc_commands through @kition/cli@0.1.1, built from KitionAI/kition-doc@41e14a8).
