---
title: "paint.freeform.addPoint: Add Freeform Point — Vector kit command — Kition"
description: "Adds a colour point to the freeform gradient on the selection's fill or stroke at a position, with colour, opacity and spread."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/paint.freeform.addPoint"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/paint.freeform.addPoint](https://developer.kition.ai/docs/kits/vector/commands/paint.freeform.addPoint)

# paint.freeform.addPoint

**Add Freeform Point.** Adds a colour point to the freeform gradient on the selection's fill or stroke at a position, with colour, opacity and spread.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `at` | `number[]` | no | document coordinates |
| `color` | `string` | no | default: the gradient's colour there |
| `id` | `integer` | no | object ID |
| `ids` | `integer[]` | no | object IDs |
| `item` | `integer \| null` | no |  |
| `line` | `boolean` | no | join it to the selected point: extends the line ending there, else starts one |
| `opacity` | `number` | no | 0..1, or 0..100 |
| `spread` | `number` | no | 0..1, or 0..100 %; the radius of pure colour around the point, a fraction of half the object's larger side; default 0 |
| `stroke` | `boolean` | no | default: the targeted item's kind, else the active proxy |
| `target` | `string` | no | "object" (default) or "contents": the objects themselves, or what their groups and layers hold |

## Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `at`, `color`, `id`, `ids`, `item`, `line`, `opacity`, `spread`, `stroke`, `target`. 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": {
    "at": {
      "description": "document coordinates",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "color": {
      "description": "default: the gradient's colour there",
      "type": "string"
    },
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "item": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "line": {
      "default": true,
      "description": "join it to the selected point: extends the line ending there, else starts one",
      "type": "boolean"
    },
    "opacity": {
      "description": "0..1, or 0..100",
      "type": "number"
    },
    "spread": {
      "description": "0..1, or 0..100 %; the radius of pure colour around the point, a fraction of half the object's larger side; default 0",
      "type": "number"
    },
    "stroke": {
      "description": "default: the targeted item's kind, else the active proxy",
      "type": "boolean"
    },
    "target": {
      "description": "\"object\" (default) or \"contents\": the objects themselves, or what their groups and layers hold",
      "type": "string"
    }
  },
  "returns": "{index}",
  "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).
