Change the font color of node's label?

Hello, I am having trouble changing the font color (not background color) of a self-created node.
image
This is how my node looks like for now, as you see the background color is perfect, but I want to change the default text color (black) to white as the background color of my "label" is too dark, I guess changing the text to white would make it looks nicer.
This is how I defined the node's appearance. It seems I can change it to italic (see red-ui-flow-node-label-italic api), but which API allows me to change the color of the font? I'm trying to understand how to implement it. Any comments or suggestions are welcome!

<script type="text/javascript">
    RED.nodes.registerType("adcxxx_i2c", {
        category: "i2c_sensor",
        defaults: {
            name: {value:""},
            i2c_device_number: {value:1,validate:RED.validators.number()},
            i2c_address: {value:"0x00"},
        },
        color:"#FFCC66",
        inputs: 1,
        outputs: 1,
        icon: "Raspberry Pi",
        label: function() {
            return this.name || "adcxxx_i2c";
        },
        labelStyle: function() {
            return this.name ? "node_label_italic" : "";
        },
        oneditprepare: function() {
            this.i2c_device_number = !this.i2c_device_number ? 1 : this.i2c_device_number;  
            this.i2c_address = !this.i2c_address ? "0x00" : this.i2c_address;
        },
        oneditsave: function () {
        }
    });
</script>

Short answer is can't be done
See last long thread on the subject and read knolleary last comment

1 Like

I would totally support the ability to change the text colour.
I my case, we have subflows that handle the integration with our platform API and we are using #6D5AF0 background because it is the official colour of the company. Choosing any other colour would not makes much sense.

image

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