Several ways to modify the theme of Matlab

1. Modify in Matlab presets (settings)

Modify the background color of Matlab

2. Overwrite prefdir file

Run in the Matlab command line window, prefdirand matlab will display the location of the preset file (matlab.prf).
Insert picture description here
After you find the file and open it, it looks like this

#MATLAB Preferences
#Fri Oct 16 14:18:05 CST 2020
EditorMCodeFoldEnabledfunction=Btrue
EditorCodeBlockDividers=Btrue
DelimiterOptionsTypingMisMatchType=I5
MatlabExitConfirm=Bfalse
Spreadsheet.DecimalSeparator=I46
EditorMCodeFoldCollapseFileOpenwhile=Bfalse
mlint-configurations-list=SC:\\Users\\Kearney\\AppData\\Roaming\\MathWorks\\MATLAB\\R2017b\\MLintDefaultSettings.txt
EditorMFunctionIndentType=SMixedFunctionIndent
ColorsUseSystem=Btrue
ReplaceSearchText=Sautocov_to_var
DelimiterOptionsMoving=Btrue
EditorMCodeFoldCollapseFileOpenfunction=Bfalse
Colors_HTML_HTMLLinks=C-16776961
mlint-configuration-file=SC:\\Users\\Kearney\\AppData\\Roaming\\MathWorks\\MATLAB\\R2017b\\MLintDefaultSettings.txt
ReplaceSearchText9=S
ReplaceSearchText8=S
ReplaceSearchText7=Svar
ReplaceText9=S
DataStatistics.XLocation=I20
ReplaceSearchText6=Sdata
ReplaceText8=S
ReplaceSearchText5=SA1
ReplaceText7=S
ReplaceSearchText4=Stsdata_to_autocov
ReplaceText6=S
ReplaceSearchText3=Ssdata_to_cpsd
ReplaceText5=S
EditorMCodeFoldCollapseFileOpenevents=Bfalse
ReplaceSearchText2=Stsdata_to_cpsd
ReplaceText4=S
EditorMCodeFoldEnabledspmd=Btrue
ReplaceText3=S
ReplaceText2=S
DelimiterOptionsMovingMisMatchType=I5
EditorMCodeFoldCollapseFileOpenmethods=Bfalse
WorkspaceBrowserUseNaNs=Btrue
Desktop.Font.Code2=F0 12 Monospaced
DelimiterOptionsTypingMatchType=I3
EditorMCodeFoldEnabledif=Bfalse
EditorMCodeFoldCollapseFileOpenif=Bfalse
ArrayEditorEDirection=I0
EditorMCodeFoldCollapseFileOpenfor=Bfalse
Editor.NonlocalVariableHighlighting=Btrue
EditorMCodeFoldEnabledenumeration=Btrue
RLOrderB2_WB_2014b_1=S0:1:
RLHiddenB2_WB_2014b_1=I16376
GeneralTextUseSystemFont=Btrue
DelimiterOptionsMovingMatchType=I1
Editor.Language.MATLAB.Extensions=Sm
EditorMCodeFoldEnabledfor=Btrue
EditorMCodeFoldEnabledcell=Bfalse
EditorOtherEditor=S
Editormlint-underlining=I2
EditorRightTextLimitLineColor=C-3355444
Editor.NonlocalVariableHighlighting.TextColor=C-16735325
ArrayEditorEMoves=Btrue
EditorMCodeFoldEnabledswitch=Bfalse
ReplaceSearchText20=S
EditorMCodeFoldEnabledmethods=Btrue
Colors_M_Strings=C-6283024
Colors_M_UnterminatedStrings=C-5111808
EditorMCodeFoldCollapseFileOpenhelp-comments=Bfalse
GeneralEightyColumns=Bfalse
ReplaceText20=S
ReplaceSearchText19=S
ReplaceSearchText18=S
ReplaceSearchText17=S
ReplaceSearchText16=S
ReplaceSearchText15=S
ReplaceSearchText14=S
ColorsText=C-16777216
ReplaceSearchText13=S
ReplaceSearchText12=S
ReplaceSearchText11=S
Colors_M_Comments=C-14513374
ReplaceSearchText10=S
DataStatistics.YLocation=I40
CommandWindowClearConfirmation=Btrue
ClosedToolTipPathAffordance=Bfalse
Colors_M_TypeSection=C-6270419
WorkspaceBrowserStatNumelLimit=I500000
ReplaceText19=S
ReplaceText18=S
ReplaceText17=S
ReplaceText16=S
ReplaceText15=S
ReplaceText14=S
ReplaceText13=S
ReplaceText12=S
EditorMCodeFoldEnabledclassdef=Btrue
ReplaceText11=S
ReplaceText10=S
ArrayEditor_CS_Format=I0
ColorsBackground=C-1
ColorsUseMLintAutoFixBackground=Btrue
ReplaceWholeWord=Bfalse
EditorMCodeFoldCollapseFileOpenblockcomments=Bfalse
CommandWindowShowStartupMessage=Bfalse
Color_CmdWinErrors=C-1703936
GeneralNumDisplay=Sloose
EditorCodepadHighVisible=Btrue
ReplaceMatchCase=Bfalse
EditorMCodeFoldCollapseFileOpenspmd=Bfalse
EditorMCodeFoldEnabledhelp-comments=Btrue
EditorMCodeFoldCollapseFileOpenswitch=Bfalse
LimitSearchToSelection=Bfalse
RLWidthB2_WB_2014b_1_1=I130
Colors_M_SystemCommands=C-5075968
RLWidthB2_WB_2014b_1_0=I130
EditorMCodeFoldCollapseFileOpenclassdef=Bfalse
EditorMCodeFoldEnabledblockcomments=Btrue
Colors_M_Errors=C-65536
GeneralUseToolboxCacheDiag=Bfalse
EditorMRU8=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\demo\\var9_test.m
ReplaceWordWrap=Btrue
EditorMRU7=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\demo\\var5_test.m
EditorMRU6=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\core\\tsdata_to_infocrit.m
EditorMRU5=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\core\\var_to_tsdata.m
EditorMRU4=SD:\\Program Files\\MATLAB\\R2017b\\toolbox\\MVGC1-1.0\\demo\\mvgc_demo_bootstrap.m
EditorMRU3=SD:\\Downloads\\anidea-matlab-theme-changer-master\\matlab-theme-changer\\src\\matlabThemeChooser.m
EditorMCodeFoldEnabledproperties=Btrue
EditorMRU2=SD:\\Downloads\\anidea-matlab-theme-changer-master\\matlab-theme-changer\\src\\ColorSetting.m
EditorMRU1=SD:\\Downloads\\anidea-matlab-theme-changer-master\\matlab-theme-changer\\src\\applyPrfFile.m
Editormlint-display=Btrue
CodepadShowMessageBar2=Bfalse
RLPrevInitB2_WB_2014b_1=Btrue
DelimiterOptionsTyping=Btrue
Colors_M_Warnings=C-27648
EditorMCodeFoldCollapseFileOpencell=Bfalse
EditorMCodeFoldCollapseFileOpenproperties=Bfalse
Editor.VariableHighlighting.Automatic=Btrue
Editor.VariableHighlighting.Color=C-3479320
Desktop.Font.Text2=F0 9 Microsoft YaHei UI
Color_CmdWinWarnings=C-39936
EditorMCodeFoldEnabledevents=Btrue
ColorsMLintAutoFixBackground=C-1121868
Colors_M_Keywords=C-16776961
Editorhighlight-lines=C-197412
EditorMCodeFoldCollapseFileOpentry=Bfalse
EditorMCodeFoldCollapseFileOpenenumeration=Bfalse
Editor.Language.MATLAB.Indenting=SSmartIndent
EditorMCodeFoldEnabledtry=Btrue
Editorhighlight-caret-row-boolean-color=C-2167080
ReplaceText=S
GeneralNumFormat2=Sshort
EditorMCodeFoldEnabledwhile=Btrue

Then add it after this text (here is the Darcula theme preset)

ColorsUseSystem=Bfalse
ColorsUseMLintAutoFixBackground=Btrue
Editor.VariableHighlighting.Automatic=Btrue
Editor.NonlocalVariableHighlighting=Btrue
EditorCodepadHighVisible=Btrue
EditorCodeBlockDividers=Btrue
Editorhighlight-caret-row-boolean=Bfalse
EditorRightTextLineVisible=Btrue
EditorRightTextLimitLineWidth=I1
ColorsText=C-5654586
ColorsBackground=C-14803426
Colors_M_Keywords=C-3377102
Colors_M_Comments=C-8355712
Colors_M_Strings=C-9795751
Colors_M_UnterminatedStrings=C-4440260
Colors_M_SystemCommands=C-7707333
Colors_M_Errors=C-6411993
Colors_M_TypeSection=C-14739
Color_CmdWinErrors=C-38040
Color_CmdWinWarnings=C-26368
Colors_HTML_HTMLLinks=C-14124066
Colors_M_Warnings=C-11382726
ColorsMLintAutoFixBackground=C-12569813
Editor.VariableHighlighting.Color=C-13477571
Editor.NonlocalVariableHighlighting.TextColor=C-6785366
Editorhighlight-lines=C-16777216
Editorhighlight-caret-row-boolean=Btrue
Editorhighlight-caret-row-boolean-color=C-14145496
EditorRightTextLineVisible=Btrue
EditorRightTextLimitLineColor=C-11711155
EditorRightTextLineLimit=I80
ColorsSearchResult=C-15379935
Desktop.Font.Code=F0 13 Monospaced

Save and restart Matlab
Insert picture description here

3. Okami work

https://gitee.com/anidea/matlab-theme-changer
https://gitee.com/anidea/matlab-schemer

References

Guess you like

Origin blog.csdn.net/weixin_43031092/article/details/109116168