# 🖼️ Background

Basics

Background is made up of three parts: left middle and right. I think it's easy to understand how the background works. The plugin obtains the width of your text and uses the binary search method to piece together a background image that adapts to the text.

## Add a new background configuration

<figure><img src="https://content.gitbook.com/content/38qW4kbjQZD9awFw00si/blobs/Idlam4Pz8QEWhTdXXRhV/image.png" alt=""><figcaption></figcaption></figure>

Background config contains 9 images and a YAML config file.

```yaml
left:
  image: b0
  height: 14
  ascent: 7

right:
  image: b0
  height: 14
  ascent: 7

middle:
  height: 14
  ascent: 7
  1: b1
  2: b2
  4: b4
  8: b8
  16: b16
  32: b32
  64: b64
  128: b128
```

**height/ascent**:&#x20;

> * height: The height of the character, measured in pixels. Can be negative. This tag is separate from the area used in the source texture and just rescales the displayed result.
> * ascent: The ascent of the character, measured in pixels. This value adds a vertical shift to the displayed result.

<figure><img src="https://content.gitbook.com/content/38qW4kbjQZD9awFw00si/blobs/a6RV4rgppGGc12PGgz2O/image.png" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mo-mi.gitbook.io/xiaomomi-plugins/customnameplates/plugin-wiki/customnameplates/add-new-contents/background.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
