Color preference for Sch editor and Waveform viewer

Hi All,

Is anybody know where can I find the file that store the setting for Color preference for both Sch editor and Waveform viewer?

I am hoping to find it, and copy the setting file across my work PC, so I can be sure to have a consistent color profile.

Thanks,
Arief,

It is in registry… I document that in either my general or command guideline. I will check that once I can access my laptop.

Cool,

I found it in your General guide…

Why is it not a simple preference file…haha

I have no idea… @RDunn, from a programming standpoint, what is the benefit of saving preferences in the registry over a preference file?

I think that the choice depends on what development tools you use, what you need to save, and whether you want to deal with the possibility that the user manually changes/corrupts something. Mike uses tools that save a lot of stuff automatically to the registry (window layouts, etc.) so I suspect that he just wanted to keep everything in the same place.

FWIW, I have an item on my TODO list to create a program to save/restore the QSpice color settings. Mike confirmed that he had no plans to add such a feature.

I got as far as mapping all of the registry entries to the GUI elements and stalled trying to decide whether the program could be a simple command line tool or needed to be a GUI program. What do you guys think?

–robert

1 Like

This is good idea. Actually, I want to have a template to load predefine color map(s)? to setup color for multiple channels instead of selecting color one by one.


Thats really great… I guess simple command line is enough, as long you can show exactly what we need to write in command prompt.

Anyway, I asked ChatGPT to give me 24 trace color pallete, and it looks awesome

24 is too much for me; even though they are different colors, I think I cannot differentiate them anymore… :rofl:

Here is a color palette map from MATLAB.

1 Like

I should ask my wife is she can see the color difference or not.

Anyway, I realized, I can simply export the registry.

Then open it in notepad, then copy the DataColor part into ChatGPT then tell it to replace the DataColor with its suggestion, then copy it back to the registry file.

After done, I simply save the registry file, then double click that registry file to load it into windows registry

OK, I could probably knock out a command line version in a day or three. Here’s what I was thinking:

  • User sets up colors using QSpice GUI.
  • User runs the command line tool with a file name an a “save to file” option switch. This copies from registry to a color set file (*.qclr?).
  • To restore colors to the registry, user would provide the file name and a “restore to registry” option switch. (Note that the QSpice GUI should be closed while running the restore.)

The *.qclr file would be text so it could be modified directly. So, rather than creating a new color set using the QSpice GUI, an existing *.qclr file could be copied/edited.

Looking for your input so let me know if that sounds sufficiently useful.

I thought about that. Didn’t think that most folk would want to monkey around with the registry directly. But, yeah, that should work.

Actually I also never understood the registry beforehand.
Anyway, gladly Mike decided to choose human readable name for the registers.

And I just realized:

  1. some of the settings edited by registry can goes to the range outside of the one provided by Qspice GUI.
  2. anyway, the Qspice behavior upon receiving the setting out of bound are not consistent, some will follow exactly the value we write on the registry. some will have internal limit and ignore the registry value.

On the file name → .qpreference ?? .qpref ??

Anyway, quick question… is the registry address always same for every PC?

Well, not that one. Don’t use HKEY_USERS – use HKEY_CURRENT_USER, i.e.,
[HKEY_CURRENT_USER\Software\Marcus Aurelius Software LLC\QSPICE[Preferences]].

I suggest that you edit the saved file to remove non-color-related keys.

Totally understood.

Though, actually I will keep all the graphic keys that I already understand… And remove the rest that I don’t to avoid messing up

@physicboy @KSKelvin

OK, here’s a first pass at a tool to save/restore QSpice color settings. Look for QColorPrefs in the WIP folder on the dev branch:

I’m thinking that I should add a switch to restore only waveform color settings. As is, all waveform & schematic color settings are saved/restored.

Let me know what you think.

–robert

It works great…

Though, I think you may be better to include all the CADxxxx keys and following:

JunctionSize /t REG_SZ /d 2.0 /f

BackgroundColor /t REG_SZ /d 0x000000 /f
CursorBackFore /t REG_SZ /d 0x000000 /f
CursorBackGnd /t REG_SZ /d 0x55ccff /f
CursorLineColor /t REG_SZ /d 0xffffff /f

NumberDataTraceColors /t REG_SZ /d 24 /f
WaveFormViewerFontPoints /t REG_SZ /d 80 /f
WaveformPlotLineWidth /t REG_SZ /d 2.0 /f

Though I must admit that I forgot if that only work in CMD, so I double clicked a few times and find nothing happen…

By the way: I made this Template for Dark mode and light mode in batch file (remove .txt)

Q-Darkmode.bat.txt (7.6 KB)
Q-Lightmode.bat.txt (7.9 KB)

Anyway, any idea how to change the color of commented out component?

It’s some kind of of Grey, but if I set the Sch editor background to pure black 0x000000, the commented out part just disappear blended with the background

I thought that I got all of the CADxxx stuff. What did I miss?

As for the others, I’ve added switches to restore schematic colors only, waveform colors only, or both. (Not yet posted to Github.) Of the above, which are schematic and which are waveform?

Thanks for the example batch files. I’ll look at them later today.

Not sure. Could you post a sample schematic with “commented out component?”

This is the commented (disabled) part. The color stays dull grey either with default, light, or dark. But if set real black then it disappear. sorry for sending low res.

And anyway, the batch file already has comment to separate Sch editor and waveform viewer settings.

1 Like