[NEW] Theming Update: Major Visual Changes in Perspective

Doesn’t seem to work for me. My theme override is working because the border style one is taking effect, but not the background.

image

Does the tab content have a View or component within it? Could you provide a photo of the Tab Component in use with a component in place “behind” the Tab Component which you would expect to see? Based on your screenshots, it looks like you haven’t saved the changes to the theme file, OR the changes have not been picked up by the session. You might need to start a new session, or you might need to clear your browser cache if you have indeed saved the correct file.

Ok, I got it to work now. There must have been something I couldn’t see wrong with the css code because when I retyped it all back in it worked fine. Cache didn’t make a difference, but it seemed to use an old version of the file when it encountered something it didn’t like. Not sure if that makes sense.

1 Like

Were you able to capture any details in the logs? Surely something must have complained.

I’d suggest using a code editor next time to help with for realtime syntax evaluation and code completion. The theming should pick up the changes in realtime merely requiring you to refresh the page so that the updated resources are re-fetched. Using the browsers developers tools to experiment is also a good idea, and I’d highly recommend it. -Y

Yeah, I started doing that after the issues. Thank you!

Is there a colorblind theme? If not, can you incorporate it?

Yes, you can create your own “colorblind” theme.

We have a ticket for this with initial design concepts and color palettes in-progress. A primary use case for the colorblind-friendly theme would be charting and data visualization - and unfortunately all of our charting components don’t play well with the theming variables at this time. We’re working first to get that dialed in, then we’ll follow up with the colorblind themes.

1 Like

Thank you. I see that Windows 10 has this setting. Is there a way that I can script in Ignition to run ctrl + windows + c to toggle this setting in Windows 10? If so, what would that script look like?

I see that I can perform this with the Keyboard library in Python. However, when I add that library to Ignition, I get an error:

Traceback (most recent call last):
File “”, line 11, in
File “C:\Users\andrew Warunek.ignition\cache\gwlocalhost_8088\C0\pylib\keyboard_init_.py”, line 128, in
raise OSError(“Unsupported platform ‘{}’”.format(_platform.system()))
OSError: Unsupported platform ‘Java’

Does Ignition not accept the Keyboard library? If not, what library would work to run this script in Ignition:

import keyboard
keyboard.send(“windows+ctrl+c”)

There’s no direct communication between Perspective in the browser and the OS. Adding the ability for Perspective to run OS commands would be a big security problem.

Perspective scripts are actually running on the gateway - even if you get the keyboard library to work, it’s not going to do anything on the local session. Imagine if any malicious website could trigger arbitrary key input on demand.

For a system I deal with there is a actually a valuable use case for running an OS command from the HMI.

In this particular case the HMI is Cimplicity based and the use case is that for permissive screens that show the state of a permissive in the PLC, there is a link that when clicked sends an OS command to open up the PLC programming software to the actual rung that drives the permissive. In this way a maintenance person can look at a permissive screen and jump directly to the PLC code to diagnose why the permissive isn’t on.

I’ve been trying to think of a way in Ignition that could achieve the same result. As the HMI is currently a full system running on the maintenance PC, along with the PLC software, and directly connect to the actual PLC, I think that I may be able to achieve this in Ignition through a GW script. However if the I separate the Ignition session away from the GW then I can’t see how this can be achieved.

Vision can do this now and it may be possible for Perspective Workstation to do it in the future.

Well these are just mental exercises at the moment to see what can and can’t be easily done in a hypothetical port of the HMI to Ignition.

So I would like to use Vision in this case. What library would I have to import to get this to work?

Try using java.awt.Robot instead of a Python library: https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/java/awt/Robot.html

1 Like

How do you go back to the default theme in perspective? All six themes are neat, but once I set it to one, I am not sure how to go back to the original default.

The default is “light”.