HISE Logo Forum
    • Categories
    • Register
    • Login

    Use custom # code for Color

    Scheduled Pinned Locked Moved General Questions
    6 Posts 2 Posters 81 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.
    • T
      tiesvdam
      last edited by

      Hello,

      I want to use a custom color code. How do i remake this code so it works?

      #FFFF5800

      if (obj.selected && obj.columnIndex != 2) 
      		{
      			g.setColour(Colours.withAlpha(obj.itemColour, 0.5));
      			g.fillEllipse([a[0] + 5, a[1] + a[3] / 2 - 6 / 2, 6, 6]);
      
      mmprodM 1 Reply Last reply Reply Quote 0
      • mmprodM
        mmprod @tiesvdam
        last edited by

        @tiesvdam instead of obj.itemColour, use 0xFFFF5800

        For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
        John 3:16

        T 2 Replies Last reply Reply Quote 1
        • T
          tiesvdam @mmprod
          last edited by

          @mmprod said in Use custom # code for Color:

          0xFFFF5800

          Amazing, thanks <3

          1 Reply Last reply Reply Quote 1
          • T
            tiesvdam @mmprod
            last edited by

            @mmprod

            And for this one?
            g.setColour(Colours.withAlpha(Colours.orangered, opacity));

            i that it would be:
            g.setColour(Colours.withAlpha(Colours.0xFFFF5800, opacity));

            But that did not work :(

            mmprodM 1 Reply Last reply Reply Quote 0
            • mmprodM
              mmprod @tiesvdam
              last edited by mmprod

              @tiesvdam said in Use custom # code for Color:

              @mmprod

              And for this one?
              g.setColour(Colours.withAlpha(Colours.orangered, opacity));

              i that it would be:
              g.setColour(Colours.withAlpha(Colours.0xFFFF5800, opacity));

              But that did not work :(

              Just remove the “Colours.” So you’re left with just “0xFFFF5800”

              For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
              John 3:16

              T 1 Reply Last reply Reply Quote 1
              • T
                tiesvdam @mmprod
                last edited by

                @mmprod Perfect thanks!

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

                28

                Online

                1.7k

                Users

                11.8k

                Topics

                102.3k

                Posts