Forum
    • Categories
    • Register
    • Login

    Get Panel Attributes - Colours

    Scheduled Pinned Locked Moved Solved Scripting
    11 Posts 4 Posters 69 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.
    • David HealeyD
      David Healey @Chazrox
      last edited by

      @Chazrox that is the color, as a decimal rather than hex.

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      ChazroxC 1 Reply Last reply Reply Quote 0
      • ChazroxC
        Chazrox @David Healey
        last edited by

        @David-Healey How do I convert that to a HEX? and why did it produce that object when I pasted that decimal number in the chat?

        dannytaurusD David HealeyD 2 Replies Last reply Reply Quote 0
        • dannytaurusD
          dannytaurus @Chazrox
          last edited by dannytaurus

          @Chazrox It's possible that you didn't actually copy the decimal value and it pasted whatever else was on your clipboard.

          If you use a clipboard manager, call it up and see what's actually in your clipboard history.

          Meat Beats: https://meatbeats.com
          Klippr Video: https://klippr.video

          ChazroxC 1 Reply Last reply Reply Quote 1
          • David HealeyD
            David Healey @Chazrox
            last edited by

            @Chazrox said in Get Panel Attributes - Colours:

            How do I convert that to a HEX?

            Engine.intToHexString() but you should be able to use the integer representation directly in your paint routines I think.

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            ChazroxC 1 Reply Last reply Reply Quote 0
            • ChazroxC
              Chazrox @dannytaurus
              last edited by

              @dannytaurus quite possible!

              1 Reply Last reply Reply Quote 0
              • ChazroxC
                Chazrox @David Healey
                last edited by

                @David-Healey Yup that worked. Thanks!

                Works.

                var ColourNOW = 3758365736;
                
                Console.print(Engine.intToHexString(ColourNOW));
                
                panelColourTesting.set("itemColour", ColourNOW);
                
                
                1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk
                  last edited by

                  In the end, a number is a number. The format (base) is just a chosen representation of the same number, be it decimal, hexadecimal, binary, octal or whatever fancy base-factorial one can invent 🤪

                  Hise made me an F5 dude, any other app just suffers...

                  ChazroxC David HealeyD 2 Replies Last reply Reply Quote 0
                  • ChazroxC
                    Chazrox @ustk
                    last edited by

                    @ustk great insight! Very true. I guess I could have just tried the decimal point first but I automatically thought it would be wrong. I just tried it and it does work both ways. Thanks!

                    1 Reply Last reply Reply Quote 0
                    • ChazroxC Chazrox marked this topic as a question
                    • ChazroxC Chazrox has marked this topic as solved
                    • David HealeyD
                      David Healey @ustk
                      last edited by

                      @ustk said in Get Panel Attributes - Colours:

                      In the end, a number is a number. The format (base) is just a chosen representation of the same number, be it decimal, hexadecimal, binary, octal or whatever fancy base-factorial one can invent 🤪

                      Except when you try an enter an integer in the property editor colour fields it misinterprets it.

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      ustkU 1 Reply Last reply Reply Quote 1
                      • ustkU
                        ustk @David Healey
                        last edited by ustk

                        @David-Healey There might be a bad parsing at some point. Without really knowing, the hex might be first parsed as string by the property editor...

                        Hise made me an F5 dude, any other app just suffers...

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

                        12

                        Online

                        2.4k

                        Users

                        13.7k

                        Topics

                        119.3k

                        Posts