---
title: "page.background: Page Background — Layout kit command — Kition"
description: "Sets the page background colour (hex or swatch), or none for transparent."
canonical: "https://developer.kition.ai/docs/kits/layout/commands/page.background"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/layout/commands/page.background](https://developer.kition.ai/docs/kits/layout/commands/page.background)

# page.background

**Page Background.** Sets the page background colour (hex or swatch), or none for transparent.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `color` | `string \| null` | no |  |
| `pages` | `any[]` | no | [1-based] (default: every page); default: every page |

## Call through layout_run

```text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "page.background" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `color`, `pages`. layout_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": {
      "oneOf": [
        {
          "description": "#rrggbb or a swatch name",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "pages": {
      "description": "[1-based] (default: every page); default: every page",
      "items": {},
      "type": "array"
    }
  },
  "returns": "{parents, swatch}",
  "type": "object"
}
```

Generated from the command list of @kition/layout-darwin-arm64@0.1.0 and the kit itself (layout_commands through @kition/cli@0.1.1, built from KitionAI/kition-layout@8767a18).
