# Правило, задающее цвет текста

> Например, необходимо в выпающем списке стран выделить некоторые из них цветом.

<figure><img src="/files/MbSVgBr5bxJpO9ToDmZu" alt=""><figcaption></figcaption></figure>

1. Создайте следующее правило:

<figure><img src="/files/ZNpI0ts0e3honHbQprS7" alt=""><figcaption></figcaption></figure>

2. Загрузите json-файл:

```json
{
    "query": {
        "nestedFields": [
            {
                "fieldId": "label"
            }
        ]
    },
    "limit": 5,
    "transformers": [
        {
            "transformerId": "CONDITION",
            "params": "{\n    \"condition\": {\n        \"fieldId\": \"shortInfo\",\n  \"type\": \"in\",\n  \"value\": \"AU,AL,AD,BS,GB,IO,VG,AT,BE,BG,HU,DE,GR,DK,IE,ES,IT,CY,LV,LT,LU,MT,NL,PL,PT,RO,SK,SI,FI,FR,HR,CZ,SE,EE,IS,CA,LI,FM,MC,NZ,NO,KR,SM,MK,SG,US,TW,UA,ME,CH,JP\"\n    },\n    \"actions\": [\n        {\n            \"type\": \"setRowColor\",\n            \"value\": \"#ffffff\"\n        },\n        {\n            \"type\": \"setTextColor\",\n            \"value\": \"#DF2935\"\n        }\n    ]\n}"
        }
    ],
    "sort": "label,ASC"
```

где "limit": 5 - количество стран в выпадающем списке. Условие: если страна входит в список, то задан цвет фона текста и цвет текста.


---

# 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://docs.aamsystems.ru/passoffice/passoffice-guide/admin-guide-doc/konfigurirovanie/editor-rule-base/pravilo-zadayushee-cvet-teksta.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.
