# Color Option

### Introduction

The `ColorOption`class inherits from the `Option<Color>` class and allows users select RGBA values via the sliders or the color picker.

### Constructor

The color picker constructor takes a "parent" context menu. You have to provide the menu in which you are adding the ColorOption, like inside of a SubMenu or the actual ContextMenu.

You can see an example of this used in the `TextWidget` class.

{% code fullWidth="false" %}

```java
ContextMenu menu = new ContextMenu(<parameters>);
menu.addOption(new ColorOption("TextColor", menu, () -> this.textColor, value -> this.textColor = value));
```

{% endcode %}
