omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Color picker

    Pythonista
    9
    22
    14745
    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.
    • JonB
      JonB last edited by JonB

      https://github.com/jsbain/uicomponents/blob/master/colorpicker.py

      Start of a simple chooser, similar to the built in one above. I got a little sloppy, so you cannot quite get to pure white :). Also a real class would have a done button, delegate callbacks, and a "shield" so it can act modally, but this gives the basic idea.

      My intention was to store recently selected colors and display those as well.

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by JonB

        1 Reply Last reply Reply Quote 3
        • ywangd
          ywangd last edited by

          @JonB The color picker looks great. It can be potentially used as the UI for customisation of stash color theme. This is something I'd like to support in future developments. It may take a while though as I have other issues to fix first. But I guess most importantly is to have an official 1.6 releas to ensure efforts are not to be wasted ...

          1 Reply Last reply Reply Quote 0
          • techteej
            techteej last edited by

            @JonB Why not improve upon the existing sample code?

            1 Reply Last reply Reply Quote 0
            • JonB
              JonB last edited by

              folks seemed to want the color box style picker, rather than a triple slider approach.
              Another option would be a webview with something like
              http://antelle.github.io/small-color-picker/

              1 Reply Last reply Reply Quote 0
              • MartinPacker
                MartinPacker last edited by

                Colourbox is where you want the choices constrained (eg "recents" or "not too many for you to confidently choose") whereas sliders is a good way of being precise.

                I suspect most use cases want the former, but a few want the precision of the latter.

                1 Reply Last reply Reply Quote 0
                • ccc
                  ccc last edited by

                  Or a tabbed view that delivers both.

                  1 Reply Last reply Reply Quote 2
                  • MartinPacker
                    MartinPacker last edited by

                    Agreed @ccc

                    1 Reply Last reply Reply Quote 0
                    • techteej
                      techteej last edited by

                      @JonB I was thinking of code that I had found a while ago as a normal color picker (one with box style) but it turned out to not be sample code and now forget where I found it!

                      1 Reply Last reply Reply Quote 0
                      • Webmaster4o
                        Webmaster4o last edited by

                        @JonB can we use objc_util to get into Pythonista's color picker and present it elsewhere?

                        1 Reply Last reply Reply Quote 1
                        • lukaskollmer
                          lukaskollmer last edited by

                          @Webmaster4o I remember the post was Editorial related

                          Webmaster4o 1 Reply Last reply Reply Quote 0
                          • Webmaster4o
                            Webmaster4o @lukaskollmer last edited by

                            @lukaskollmer which post?

                            1 Reply Last reply Reply Quote 0
                            • lukaskollmer
                              lukaskollmer last edited by

                              @Webmaster4o I can't find it right now. The class you're looking for is OMColorPickerViewController

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post
                              Powered by NodeBB Forums | Contributors