# lcd.clear

Clears the LCD screen optionaly filling it with selected color

### Syntax

#### lcd.clear( \[color] )

### Parameters

<table><thead><tr><th width="117">Name</th><th width="68" data-type="checkbox">Req</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td>color</td><td>false</td><td>integer (colorFlag)</td><td>see <a href="/pages/Px79hTRdzxQHTLRLGxCO">Drawing Flags</a></td></tr></tbody></table>

### Returns

none

### Notes

This function works only in stand-alone and telemetry & widget scripts. See [script types](/overview/script-types.md).

### Available on

* [x] [B\&W LCD radios](/overview/radios.md#radios-with-b-and-w-lcd-screen)
* [x] [Grayscale LCD radios](/overview/radios.md#radios-with-grayscale-lcd-screen)
* [x] [Color LCD radios](/overview/radios.md#radios-with-color-lcd-screen)

### API status

<table><thead><tr><th width="166">EdgeTX version</th><th width="573">Action</th></tr></thead><tbody><tr><td>2.3.0</td><td>Introduced</td></tr></tbody></table>

### Examples

{% tabs %}
{% tab title="Example 1" %}

```lua
-- clearing lcd with system default color
lcd.clear()
```

{% endtab %}

{% tab title="Example 2" %}

```lua
-- clearing lcd screen to dark red
local darkred = lcd.RGB(20,0,0)  -- create color_flag for color
lcd.clear(darkred)
```

{% endtab %}
{% endtabs %}

### Related topics

* [Drawing flag](/lua-api-programming/drawing-flags-and-colors.md)
* [Color constants](/lua-api-reference/constants/color-constants.md)


---

# 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://luadoc.edgetx.org/lua-api-reference/display-lcd/clear.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.
