---
title: "shape.fill: Shape Fill — Slide kit command — Kition"
description: "Sets the fill: a color, none, a gradient, a picture or a pattern. Applies to the shapes in `ids` (on slide `onSlide`, from 1) or else the selection."
canonical: "https://developer.kition.ai/docs/kits/slide/commands/shape.fill"
---

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

# shape.fill

**Shape Fill.** Sets the fill: a color, none, a gradient, a picture or a pattern. Applies to the shapes in `ids` (on slide `onSlide`, from 1) or else the selection.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `color` | `string` | no | one of several alternative parameters |
| `gradient` | `object` | no | {stops: [[pos, color]], angle?, kind?: linear\|radial}; one of several alternative parameters |
| `ids` | `(integer \| string)[]` | no |  |
| `none` | `boolean` | no | one of several alternative parameters |
| `onSlide` | `integer` | no | the slide the ids are on, from 1 |
| `pattern` | `object` | no | {preset, fg, bg}; one of several alternative parameters |
| `picture` | `any` | no | base64; one of several alternative parameters |
| `reset` | `boolean` | no | one of several alternative parameters |
| `transparency` | `number` | no | 0 to 1; one of several alternative parameters |

## Call through slide_run

```text
slide_run {
  "path": "<file>.pptx",
  "steps": [{ "command": "shape.fill" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `color`, `gradient`, `ids`, `none`, `onSlide`, `pattern`, `picture`, `reset`, `transparency`. slide_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": {
    "color": {
      "description": "one of several alternative parameters",
      "type": "string"
    },
    "gradient": {
      "additionalProperties": true,
      "description": "{stops: [[pos, color]], angle?, kind?: linear|radial}; one of several alternative parameters",
      "properties": {
        "angle": {
          "type": "number"
        },
        "kind": {
          "enum": [
            "linear",
            "radial"
          ],
          "type": "string"
        },
        "stops": {
          "description": "[[pos, color]]",
          "items": {
            "type": "array"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ids": {
      "items": {
        "description": "an id",
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-types": [
        "Shape"
      ]
    },
    "none": {
      "default": true,
      "description": "one of several alternative parameters",
      "type": "boolean"
    },
    "onSlide": {
      "description": "the slide the ids are on, from 1",
      "type": "integer"
    },
    "pattern": {
      "additionalProperties": true,
      "description": "{preset, fg, bg}; one of several alternative parameters",
      "properties": {
        "bg": {},
        "fg": {},
        "preset": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "picture": {
      "description": "base64; one of several alternative parameters"
    },
    "reset": {
      "default": true,
      "description": "one of several alternative parameters",
      "type": "boolean"
    },
    "transparency": {
      "description": "0 to 1; one of several alternative parameters",
      "type": "number"
    }
  },
  "type": "object",
  "x-khp-position": "independent"
}
```

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