# How to add new labels to Paint Widget

**URL:** https://discourse.vtk.org/t/how-to-add-new-labels-to-paint-widget/13300
**Category:** Web
**Created:** [February 11, 2024, 11:24am UTC](https://discourse.vtk.org/t/how-to-add-new-labels-to-paint-widget/13300 "2024-02-11T11:24:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![burak94t](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/a87d85/32.png) [@burak94t](https://discourse.vtk.org/u/burak94t)
#### Post date: [February 11, 2024, 11:24am UTC](https://discourse.vtk.org/t/how-to-add-new-labels-to-paint-widget/13300/1 "2024-02-11T11:24:45Z")

</div>

Hello everyone,  
I’m trying to use Paint Widget like in this example; [example](https://kitware.github.io/vtk-js/examples/PaintWidget.html).

But how we can add more colors/labels to it?

I tried to use addRGBPoint with setLabel like this;

```auto
cfun.addRGBPoint(1, 0, 0, 1); // label "1" will be blue
cfun.addRGBPoint(2, 1, 0, 0); // label "2" will be red

painter.setLabel(2)

```

But no hope sor far, how can I do that? Thank you in advance.

---

<div class="post-metadata">

### Author: ![burak94t](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/a87d85/32.png) [@burak94t](https://discourse.vtk.org/u/burak94t)
#### Post date: [February 11, 2024, 1:03pm UTC](https://discourse.vtk.org/t/how-to-add-new-labels-to-paint-widget/13300/2 "2024-02-11T13:03:53Z")

</div>

I find out we need to add this line to PaintFilter’s actor. I works fine now!

```auto
actor.getProperty().setUseLookupTableScalarRange(true);

```
