Help: Changing Text Color with Lua

Hi everyone! I'm working with Lua and want to change the color of text using Lua. Can someone please provide a detailed explanation or example code on how to do this? Thanks in advance!

0

Comments

2 comments
  • Hi Sahil,

    simply add a variable to the color of your text string. example:
    then use set.value or set.data. Example:

    --- @param gre#context mapargs
    local red = gre.rgb(255, 0, 0)
    function testColor(mapargs)
      gre.set_value("thermostat_layer.temperature_unit.color",red)
    end

    Best
    Max

    0
  • Thank you, Max. Could you please guide me on how to ensure that when I have multiple pages open (typically 5-6), the last visited page is saved? I would like the application to reopen on the last page I was viewing when I restart it after closing. Your assistance would be greatly appreciated.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post