HISE Logo Forum
    • Categories
    • Register
    • Login

    Animate panel colors

    Scheduled Pinned Locked Moved Scripting
    13 Posts 6 Posters 606 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.
    • d.healeyD
      d.healey @Dan Korneff
      last edited by

      @dustbro I don't think there is a built in way to do that. I wrote a colour picker some years ago which might be helpful here:

      Link Preview Image
      Example of themed GUI

      Is there a middlePosition setting for panels?

      favicon

      Forum (forum.hise.audio)

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

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

        @d-healey This link was really helpful. I was about to design an archaic and primitive system to convert decimal to Hex.

        Dan Korneff - Producer / Mixer / Audio Nerd

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

          @dustbro Look at this function I just discovered in JUCE - https://docs.juce.com/master/classString.html#aab501daf0fa0bbba1479218447d1f936

          Maybe I should add it to HISE?

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

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

            @d-healey That would be a helpful addition to my current task :)

            Dan Korneff - Producer / Mixer / Audio Nerd

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

              @dustbro

              I've added it to the Engine class. @Christoph-Hart Is this a good place for it? JUCE has it as part of the string class but I'm not sure that makes sense in HISE.

              c687e3da-096d-42b1-8240-49da0a8aac4c-image.png

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

              ulrikU 1 Reply Last reply Reply Quote 3
              • ulrikU
                ulrik @d.healey
                last edited by

                @d-healey Yes, I've waited for this, thank you David!

                Hise Develop branch
                MacOs 15.3.1, Xcode 16.2
                http://musikboden.se

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

                  @ulrik @dustbro I pushed to my fork and made a pull request.

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

                  1 Reply Last reply Reply Quote 3
                  • ?
                    A Former User @Dan Korneff
                    last edited by

                    @dustbro I guess you could add a shader (panel) and take the basic shadertoy init code as a startup! https://www.shadertoy.com/new

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

                      @dustbro @d-healey I found a simple function here to convert decimal to hex string, but it hasn't been fully tested yet.

                      inline function toHex(num, digits) 
                      {
                      	local hexTable = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
                      	local n = num;
                      	local s = digits;
                      	local result = "";
                      	while (s--)
                      	{
                      		result = hexTable[n & 0xF] + result;
                      		n = n >> 4;
                      	}
                      	return result;
                      }
                      
                      Console.print(toHex(4278221567, 8)); 
                      // output: FF007AFF
                      

                      By the way, using HSV or HSL makes it easier to control color variations, just change the value of Hue as you did in the colorpicker.
                      You may need to use some functions that convert between RGB and HSV/HSL.

                      1 Reply Last reply Reply Quote 3
                      • Dan KorneffD
                        Dan Korneff @A Former User
                        last edited by

                        @UrsBollhalder I'm going to dig into shaders after my next product release. The possibility seem really impressive.

                        Dan Korneff - Producer / Mixer / Audio Nerd

                        Christoph HartC 1 Reply Last reply Reply Quote 0
                        • Christoph HartC
                          Christoph Hart @Dan Korneff
                          last edited by

                          @dustbro There's also a bunch of helper functions in the Colours API Class:

                          Link Preview Image
                          HISE | Docs

                          favicon

                          (docs.hise.audio)

                          They should give you most color manipulation functions without having to resort to hex numbers and weird bit shuffling.

                          Christoph HartC 1 Reply Last reply Reply Quote 3
                          • Christoph HartC
                            Christoph Hart @Christoph Hart
                            last edited by

                            And a little example:

                            HiseSnippet 837.3ocsUs0aSCCE1tqAsVXHlD+.h1SYhQUJ6BHgPzsdApfsUniIda343zXsD6nDmsUglD+Y4c9G.GGm1zwpFaUh7PUO274ymy243AIRJKMUlfv0NZbLCgej0vwBUP6.BWf52Ager09jTEKw1nZuwwjzTlGBiW5cZE3ZUQ4e+5s6QBIBJqTEBcrjSYejGwUkZGz5C7vvdDO1Q7nY7dqV8oRQaYnLCvyRVtnXB8LxH1ADsaUrP3Gz0iqjICUDEKE7YOo23gAxKDF+OlmxOMjoEZhFBGjQMpc.Ozavj6ZJBgqNn7luj4l+Tq84d7o5Kq.OI2fcYDyVCvUtMH07d.I7LPppARqZMjlviUkVz34gV8EPCwm.k5YghwWTkehsZKAODpFQjyX8R.goQ3riq6F1vOq+550gxcpx9bRh8.hfE1z9M1ShbDS0VFEKEffyZFyqoiIgMxNHiAt51vEjMlZjxT5tYRaRX3oPaywOSPUbovY85eudMU.OsQBKFpoJG3XpUul4P1mnBZ3GI8bzxOSentaugcyFZ.d05yj.EIwjBmMyA+LYdf9X+rLSwErxDOJOy5aGM+ho4UoMtfqBdeFyw8xdvmqqtb.oNGS0qMpgOvM2MLzgZx+jSyVJNPpXGVbepeUc6+1ju+bsoqnIxvP.3yyr4JcKA5HxhNkkrAzmBAbNwQfjbcl2CtaLOpoAOiiRQeAWcXLqPtmLzSynz++l7TTACA92W52gnHZpagNvuXVhhqgCtC6bX12PjqY0gkdlRFm6aAsBfrJ25JSn45FJhCodYKSyEc4z0Cs9VqwSE9Ao0EbOU.Bag+DFgBX7QAJszNX8FlaLIAyvRurPh55C15MXEFfZ90llzSLhTtZ7ra3tGS6t25z9cEhqZMfqnAyGiUlCFgtw+CLVribEqt99LppDfUs580Ecg3+H8lA5QvFhDNvCrNHKZHLBSYP1E.6HU2uqnYjFYWsrtBLjI7xE9M7UXroVFWXr4DinHBMQdB0Loo2BubtF.Sh7GcpAu9Ax1MQ4SePbVvFJTD7fvITp95+bXHY9w7hEHlMWfX1ZAhY6EHlcVfXd4BDyqt0XzuEualRFYFG.EC5luFBi6JH.yJmEh9yhVWF.
                            
                            1 Reply Last reply Reply Quote 2
                            • First post
                              Last post

                            58

                            Online

                            1.7k

                            Users

                            11.7k

                            Topics

                            102.2k

                            Posts