HISE Logo Forum
    • Categories
    • Register
    • Login

    Help with component colors

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 150 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dan KorneffD
      Dan Korneff
      last edited by

      I'm trying to script colors of a panel and need some help.

      Here are the colors I'm trying to use:
      component colors.png

      my json code looks like this:

      Content.setPropertiesFromJSON(name, {
      
      		"width": 40,
      		"height": 50,
                      "bgColour": FF101010,
      		"itemColour": FFB0B938,     
      		"itemColour2": 62000000,
      		"textColour": 00FEFEFE,
      		"saveInPreset": false,
      		"opaque": 1
      		});
      

      The result looks like this:
      script resut.png

      and the text color is giving me an error in the Console:
      textcolor.png
      textcolor error.png

      Does anyone know what I'm doing wrong here?
      Thanks!

      Dan Korneff - Producer / Mixer / Audio Nerd

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by d.healey

        Use a paint routine, it will give you more control. No idea about the error.

        Edit: Oh actually the error might be because it expects a hex value, so put 0x before your colour value. Or try making the colour value a string with a # at the beginning.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        Dan KorneffD 1 Reply Last reply Reply Quote 1
        • Dan KorneffD
          Dan Korneff @d.healey
          last edited by

          @d-healey said in Help with component colors:

          Edit: Oh actually the error might be because it expects a hex value, so put 0x before your colour value. Or try making the colour value a string with a # at the beginning.

          as string didn't work, but adding 0x was the cure! 😻

          Dan Korneff - Producer / Mixer / Audio Nerd

          1 Reply Last reply Reply Quote 1
          • First post
            Last post

          45

          Online

          1.8k

          Users

          12.0k

          Topics

          104.4k

          Posts