# Node-red-node-ui-table - Change background color of a cell depending on its value

**URL:** <https://discourse.nodered.org/t/node-red-node-ui-table-change-background-color-of-a-cell-depending-on-its-value/80970>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [1 September 2023 09:54 UTC](https://discourse.nodered.org/t/node-red-node-ui-table-change-background-color-of-a-cell-depending-on-its-value/80970 "2023-09-01T09:54:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![douchebagraccoon](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@douchebagraccoon](https://discourse.nodered.org/u/douchebagraccoon)\
**Post date:** [1 September 2023 09:54 UTC](https://discourse.nodered.org/t/node-red-node-ui-table-change-background-color-of-a-cell-depending-on-its-value/80970/1 "2023-09-01T09:54:41Z")

</div>

Hello everyone !

I recently began playing around with the node-red-node-ui-table and have been trying to customize mine.

To simplify things, I'll use the example table for my question :

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/3/43c5f44c84207a097e1ffaeeb39640f9d6426433.png)

For instance, how could I turn the age cells red if the age is less than 18 ? (But only the cell and not the whole row).

Thanks in advance !

```auto
[
    {
        "id": "7dc60d599096697d",
        "type": "inject",
        "z": "03aa0562afa364f6",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "[{\"Name\":\"Kazuhito Yokoi\",\"Age\":\"35\",\"Favourite Color\":\"red\",\"Date Of Birth\":\"12/09/1983\"},{\"Name\":\"Oli Bob\",\"Age\":\"12\",\"Favourite Color\":\"blue\",\"Date Of Birth\":\"12/08/2017\"}]",
        "payloadType": "json",
        "x": 1030,
        "y": 1800,
        "wires": [
            [
                "3ddced6b90128402"
            ]
        ]
    },
    {
        "id": "3ddced6b90128402",
        "type": "ui_table",
        "z": "03aa0562afa364f6",
        "group": "625872f.40b1e8c",
        "name": "",
        "width": 0,
        "height": 4,
        "columns": [],
        "outputs": 0,
        "cts": false,
        "x": 1230,
        "y": 1800,
        "wires": []
    },
    {
        "id": "625872f.40b1e8c",
        "type": "ui_group",
        "name": "Simple table",
        "tab": "58c2aa06.ef46e4",
        "order": 1,
        "disp": true,
        "width": "10",
        "collapse": false,
        "className": ""
    },
    {
        "id": "58c2aa06.ef46e4",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 October 2023 09:55 UTC](https://discourse.nodered.org/t/node-red-node-ui-table-change-background-color-of-a-cell-depending-on-its-value/80970/2 "2023-10-01T09:55:16Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
