---
title: "fill.copy: Copy fill — Design kit command — Kition"
description: "Copies one fill of a layer (default the top one) so fill.paste can apply it."
canonical: "https://developer.kition.ai/docs/kits/design/commands/fill.copy"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/design/commands/fill.copy](https://developer.kition.ai/docs/kits/design/commands/fill.copy)

# fill.copy

**Copy fill.** Copies one fill of a layer (default the top one) so fill.paste can apply it.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer \| string` | no |  |
| `ids` | `(integer \| string)[]` | no | the first layer |
| `index` | `integer` | no | a position counted from 0 (the first is 0); default the top fill |

## Call through design_run

```text
design_run {
  "path": "<file>.kdesign",
  "steps": [{ "command": "fill.copy" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `id`, `ids`, `index`. design_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `blend` | `string` | no |  |
| `color` | `object` | no |  |
| `opacity` | `number` | no |  |
| `type` | `string` | no |  |
| `visible` | `boolean` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "blend": {
      "type": "string"
    },
    "color": {
      "additionalProperties": true,
      "properties": {
        "a": {
          "type": "number"
        },
        "b": {
          "type": "number"
        },
        "g": {
          "type": "number"
        },
        "r": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "opacity": {
      "type": "number"
    },
    "type": {
      "type": "string"
    },
    "visible": {
      "type": "boolean"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "the first layer",
      "items": {
        "description": "an id",
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "index": {
      "description": "a position counted from 0 (the first is 0); default the top fill",
      "type": "integer"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/design-darwin-arm64@0.1.0 and the kit itself (design_commands through @kition/cli@0.1.1, built from KitionAI/kition-design@abc7e16).
