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.


    Check dark mode

    Pythonista
    3
    4
    2387
    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.
    • upwart
      upwart last edited by

      With the new Pythonista 3.3 (thanks Ole!), I ran into a problem with the Synchronator script, that I use regularly.
      The scripts hard codes the colour to be written text with as (0,0,0). As a solution I have just disabled the colour setting at all, so I can at least see what's going.
      But it would be nice if I could check the dark/light mode setting from Python.
      Or, maybe better yet, get the current theme colours.

      Would it be possible to force the console output to another theme?

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

        You can query the current dark/light mode setting using the new ui.get_ui_style() function.

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

          I should probably remove the advice to use a custom dark theme in light mode or vice-versa.

          The feature didn't exist at the time I wrote this, but I would actually recommend turning off the automatic dark mode switch in that case (using the gear icon within the theme selection).

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

            Is there a possibility to set the background colour of the console?
            For the foreground (text), there's console.set_color, but I can't seem to find a function to set the background.

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