# 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="../../lua-api-programming/drawing-flags-and-colors">Drawing Flags</a></td></tr></tbody></table>

### Returns

none

### Notes

This function works only in stand-alone and telemetry & widget scripts. See [script types](https://luadoc.edgetx.org/overview/script-types).

### Available on

* [x] [B\&W LCD radios](https://luadoc.edgetx.org/overview/radios#radios-with-b-and-w-lcd-screen)
* [x] [Grayscale LCD radios](https://luadoc.edgetx.org/overview/radios#radios-with-grayscale-lcd-screen)
* [x] [Color LCD radios](https://luadoc.edgetx.org/overview/radios#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](https://luadoc.edgetx.org/lua-api-programming/drawing-flags-and-colors)
* [Color constants](https://luadoc.edgetx.org/lua-api-reference/constants/color-constants)
