2.7 Dark ModeDark-Mode
From Origin 2024, we support to set Origin interface to Dark Mode.
We use the Dark Mode toolbar or System Variable to control the interface whether set to Dark Mode
Toggle GUI to Dark Mode
You can use menu, button or set System Variable to toggle GUI to Dark Mode
- Select Preference: Dark Mode menu.
- If the Dark Mode toolbar is hidden at this time, there is a hint will show to ask whether want to show it.
- Click the Toggle GUI button in Dark Mode toolbar
- To set Origin GUI to Dark Mode, set System Variable @CTP=1. To run off the Dark Mode, set System Variable @CTP=2.
Dark Theme
Origin apply multiple themes for the Dark Mode. When Origin GUI in Dark Mode, you can select Preference: Dark Theme to change the theme style list in the menu.
Customize Dark Theme
According to the build-in dark theme, you can customize them and add a user-defined dark theme
- Select one of the build-in dark theme in the menu.
- Run the following script in the Script Window
mem -pw;
Current dark theme colors are loaded in a workbook.
- Click on the color cell and use the Mini Toolbar to change color.
Here, we change the WindowTitleBarActive
- In Script window, run the following script to save the theme as MyDark
mem -pe "MyDark";
- Pick the user-defined theme from Preferences: Dark Theme menu .
- You could find the color of active Window Title Bar is updated in the Dark Mode.
Toggle Dark Mode for Window Type
When Origin GUI in Dark Mode, you can use button or hotkey toggle global Window Dark Mode per Window Type.
- Dark Mode by Window Type button in Dark Mode toolbar.
- Active a Workbook/ Matrix/ Graph or Layout/ Image/Notes window
- Click this button, then the same type windows will toggle Dark Mode / Light Mode.
- Active a Workbook/ Matrix/ Graph or Layout/ Image/Notes window
- Press Alt+5, then the same type windows will toggle Dark Mode / Light Mode.
Toggle Dark Mode for Current Window
When the Origin GUI in Dark Mode, you can use these methods toggle current window Dark Mode.
- Current Window button in Dark Mode toolbar.
- Active a window
- Click this button, then this window will toggle Dark Mode / Light Mode.
- Active a Workbook/ Matrix/ Graph or Layout/ Image window
- Press Ctrl+5, then this window will toggle Dark Mode / Light Mode.
- Active a Workbook/ Matrix/ Graph or Layout/ Images window
- In Script Window run this script, then this window will change to Light Mode.
page.nodark=1;
- Run the following script, then this window will change to Dark Mode.
page.nodark=0;
Graph /Layout window
Toggle Dark Mode Independent
For the Graph /Layout window, it not only can toggle Dark Mode when Origin GUI in Dark Mode, it can be toggled Dark Mode independent of the GUI. When activate the Graph /Layout window the Dark Mode by Window Type button , Current Window button are available.
Dark Mode Color
Background Color
When the Graph/Layout window toggle Dark Mode, the page background (Auto color) will change auto change to the dark mode color. To Customize the dark mode color, you can:
- Click the Background Color button in Dark Mode toolbar to customize the graph background color in the dark mode.
or
|
- When Dynamic Color Reversal is Black Only, or Black and White, black is reversed to white, which we call foreground color and you can customize the Foreground color on Page tab of Preferences: Options dialog.
|
Control Dynamic Reversal
The dynamic color reversal is triggered by the luminance of dark mode background color. It can be controlled by the System Variable is @GLD.
- The default value @GLD=28 so that color only reverses for very dark background.
E.g. if you set dark mode background as dark gray, the black plots, axis and labels, etc. will reverse to white.
- While if you set dark mode background as gray, the color will not reverse. But if you set @GLD=60, even for gray backgrounds, the colors will reverse.
Dynamic Color Reversal
When the Graph window in Dark Mode, the plots and objects color in the graph will be reversed. Origin provide multiple levels of color reversal to fit different needs. It can be customized on Page tab of Preferences: Options dialog. Also, the System Variable @DCR can control whether the color is reversed when turn on Dark Mode.
@DCR Value
|
Color Reversal Option
|
|
0
|
NO
|
Disable color reversal
|
1
|
Black Only
|
Only black color will reverse to white (foreground color)
|
2
|
Black and White
|
Only black color will reverse to white (foreground color) and white color will reverse to black.
|
3
|
Gray colors
|
All gray colors from black to white will reverse, e.g. dark gray will turn into light gray.
|
4
|
All colors
|
All colors will reverse, this is similar to MS Word. E.g. if you choose light yellow, it may show as dark yellow.
|
5
|
Customized (default)
|
If the color is listed in the Edit Color Mapping in Dark Mode worksheet (click Preference: Dark Mode Color Mapping to open it), when toggle from Light Mode to Dark Mode, this color will be reversed to the mapping color in the worksheet, including plots color and graph objects color.
|
- If you want to control the reversed color, in the Edit Color Mapping in Dark Mode worksheet, you can add the Hex color value (HTML) to specify color in light mode and its counterpart in dark mode, then click Save button after customization. It will be saved to DarkColors.ini under \User Files\Themes\Graph\ folder.
- Also, you can click the Reset button to reset it from the default color list.
| - If you use Colormap in the plot, it will not reverse color in any situation.
- Origin supplies more System Variable to control color reversal:
@DCRM controls color reversal method. By default, @DCRM=0 that means it will check and reduce saturation, and use HSL to reverse color. @DCRP controls the color reversal luminosity. By default, @DCRP=15 which means all color will be converted to between 15% to 85% of luminosity
|
Table/ Worksheet in the graph
By default, the inserted table/worksheet in the graph will follow the dark mode of the graph. If you want to change the inserted table to follow the dark mode of the worksheet, you can set System Variable @TCP=1 (this System Variable default value is 0).
Copy Page in Dark Mode like on Screen
Suppose the background is dark or even a dark image in your Word, Power Point and so on, and want to keep the the plots and object color in light color like Origin Dark Mode, you can check the Preference: Copy Page in Dark Mode like on Screen option before copy page. The pasted graph background is transparent, the background in the Word/PPT still can be shown.
Export Graph in Dark Mode
- When in Dark Mode, select File: Export Graph or Export Graphs (Advanced) to export graph, there is a option Follow Dark Mode Color to control whether the plots and graph objects follow the color in Dark Mode.
- When in Dark Mode and export a graph Follow Dark Mode Color, you can use Transparent Background option to control whether the exported graph background keep the color as in Dark Mode or return to transparent background.
There is a System Variable @GEFD to control whether the Graph export following Dark Mode. By default, @GEFD=1, the exported graphs follow the color in Dark Mode. When set it to will that will ignore dark mode.
Code Builder
When Origin GUI in Dark Mode, Code Builder will follow this theme of the GUI.
If you want to change the Color of the Text in Code Builder, select Tools: Options of Code Builder menu to open the dialog. The color can be customized in Fonts and Colors page of the Options dialog. If you want to reset the color, select Tools: Reset Options
|