Community
    • Login

    Preview value color RGB, HEX, HSL.

    Scheduled Pinned Locked Moved General Discussion
    previewcolorpreviewcolors
    21 Posts 8 Posters 13.5k Views 3 Watching
    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.
    • PeterJonesP Offline
      PeterJones @PeterJones
      last edited by

      @peterjones said in Preview value color RGB, HEX, HSL.:

      My ColorizeHtmlCssColors script isn’t picking up on the ones in the style tags

      Actually, it was, but Notepad++'s lexer coloring for being an attribute was overriding my scripts indicator. If I switch to normal text (so no lexer is active), it shows the color even inside the attribute:
      97bdba40-5fe5-4374-8227-6e3333cb39af-image.png

      I am working on updating my script: it now allows #AARRGGBB as well. Eventually, as I find time, I might also add in the rgb(_,_,_) syntax as well, but I’ve got a meeting in a few minutes, so not right away.

      1 Reply Last reply Reply Quote 2
      • PeterJonesP Offline
        PeterJones @Michael Vincent
        last edited by PeterJones

        @michael-vincent said in Preview value color RGB, HEX, HSL.:

        It does now …

        I did confirm:
        b6dc4c20-b2be-4327-8838-0550119e118f-image.png

        So it’s working better than my script again, since it works even with a lexer active, and accepts other endings. :-)

        PeterJonesP 1 Reply Last reply Reply Quote 3
        • PeterJonesP Offline
          PeterJones @PeterJones
          last edited by

          Updated the github copy of the script again…

          Using dash rather than foreground. allow rgb(##,##,##) to work

          bfe892f0-5613-4053-a30c-df5f3f761681-image.png

          AutoMV ProtectionA 1 Reply Last reply Reply Quote 1
          • Catrin BrooksC Offline
            Catrin Brooks
            last edited by

            Good script!

            1 Reply Last reply Reply Quote 0
            • Alan KilbornA Alan Kilborn referenced this topic on
            • Michael VincentM Michael Vincent referenced this topic on
            • Michael VincentM Michael Vincent referenced this topic on
            • Michael VincentM Michael Vincent referenced this topic on
            • Michael VincentM Michael Vincent referenced this topic on
            • Rob DFR Offline
              Rob DF
              last edited by

              Hi guys,
              Notepad++ v 8.7.5 does not show the colors on the bottom of the code i.e. the small yellow line under #FF0000 with QCP 2.1.2.1.
              Is it normal?

              xomxX 1 Reply Last reply Reply Quote 0
              • xomxX Offline
                xomx @Rob DF
                last edited by

                @Rob-DF

                Try to disable the DirectWrite mode (uncheck N++ menu Settings > Preferences… > MISC. > “Use DirectWrite” checkbox).

                1 Reply Last reply Reply Quote 1
                • AutoMV ProtectionA Offline
                  AutoMV Protection @PeterJones
                  last edited by

                  @PeterJones Hi, I managed to complete your code so that all color formats work. If you want, I can send you the code.!Sem títulddddo.jpg

                  T 1 Reply Last reply Reply Quote 0
                  • T Offline
                    tauniaxd @AutoMV Protection
                    last edited by

                    @AutoMV-Protection Hi! Not OP, but I would love the code if you’re still willing to share!

                    PeterJonesP 1 Reply Last reply Reply Quote 0
                    • PeterJonesP Offline
                      PeterJones @tauniaxd
                      last edited by PeterJones

                      @tauniaxd said in Preview value color RGB, HEX, HSL.:

                      @AutoMV-Protection Hi! Not OP, but I would love the code if you’re still willing to share!

                      What feature are you missing from the already-existing tools:

                      With the QuickColorPicker plugin from @Michael-Vincent’s github, https://github.com/vinsworldcom/nppQCP/releases, if you have Settings > Preferences > MISC with rendering mode set to GDI (most compatible) (which, in January 2025 was done with unchecking the older version of that option, ☐ Use DirectWrite, which was the syntax mentioned by @xomx above), the plugin will underline all but the #12345678 eight-character #-based RGB:
                      cc091514-7358-491a-a33a-e13450e3f9ee-image.png

                      I still recommend using the plugin, not a script.

                      If you want a script, the on-demand version of my published script from 2022, as linked in my Jan 20, 2022 post, does the 6-digit #123456 notation and 8-digit #12345678 notation and the rgb(1,2,3) notation. And would take only a few lines of code difference to include the the rgba notation as well.

                      PeterJonesP 1 Reply Last reply Reply Quote 1
                      • PeterJonesP Offline
                        PeterJones @PeterJones
                        last edited by PeterJones

                        @tauniaxd ,

                        I have added the ability to do rgba(0,127,127,0.05)-type colors to the on-demand script at
                        https://github.com/pryrt/nppStuff/blob/main/pythonScripts/nppCommunity/21xxx/21044-ColorizeHtmlCssColors.py

                        1e6ece19-b4de-4475-b379-0649d96b2d4f-image.png

                        If you prefer full underline, then change lines 24 and 26 of the script to use INDICATORSTYLE.PLAIN instead of INDICATORSTYLE.DASH

                        aa370073-5db8-4431-b80e-7ffc21b3c61c-image.png

                        1 Reply Last reply Reply Quote 1

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors