标题: 调整Win10背景色 创建: 2020-11-12 13:08 更新: 链接: https://scz.617.cn/windows/202011121308.txt 95/98、XP、Win7可以非常灵活地设置各个控件的颜色。Win10比较扯淡,GUI界面只 能调整极少位置的颜色,放狗一搜,很多吐槽。我有一个核心诉求,将资源管理器、 记事本之类的背景色从亮白变成浅灰,之前的亮白灼眼睛。这是一个随个人变化的需 求,不讨论其是否合理、有必要,单说为满足原始需求而诉诸的努力。 有几点事先说明: a) 主要是为了解决眼睛刺痛的问题 b) 如果能通过调整显示器亮度、对比度解决问题,忽略本文 c) 本文示例视觉效果不重要,领会技术方案本质,按个人喜好进行最终设置 d) 本文不推销个人喜好,逻辑欠佳者,滚 没找到完全匹配早期Windows设置的技术方案,或者说我不曾努力去找。最后采用的 方案还算符合我的口味,分享一下。 以LTSB版本为例。 Personalize Themes Theme settings Hight Contrast Themes Hight Contrast White Save theme scz 这将生成文件: %LOCALAPPDATA%\Microsoft\Windows\Themes\scz.theme C:\Users\scz\AppData\Local\Microsoft\Windows\Themes\scz.theme 其中有一段内容: -------------------------------------------------------------------------- [Control Panel\Colors] ActiveTitle=0 0 0 Background=255 255 255 ButtonFace=255 255 255 ButtonText=0 0 0 GrayText=96 0 0 Hilight=55 0 110 HilightText=255 255 255 HotTrackingColor=0 0 159 InactiveTitle=255 255 255 InactiveTitleText=0 0 0 TitleText=255 255 255 Window=255 255 255 WindowText=0 0 0 Scrollbar=255 255 255 Menu=255 255 255 WindowFrame=0 0 0 MenuText=0 0 0 ActiveBorder=128 128 128 InactiveBorder=192 192 192 AppWorkspace=128 128 128 ButtonShadow=128 128 128 ButtonHilight=192 192 192 ButtonDkShadow=0 0 0 ButtonLight=192 192 192 InfoText=0 0 0 InfoWindow=255 255 255 ButtonAlternateFace=192 192 192 GradientActiveTitle=0 0 0 GradientInactiveTitle=255 255 255 MenuHilight=0 0 0 MenuBar=255 255 255 -------------------------------------------------------------------------- 这个目录下另有文件: %LOCALAPPDATA%\Microsoft\Windows\Themes\Custom.theme C:\Users\scz\AppData\Local\Microsoft\Windows\Themes\Custom.theme 其中有一段内容: -------------------------------------------------------------------------- [Control Panel\Colors] Scrollbar=200 200 200 Background=3 131 135 ActiveTitle=153 180 209 InactiveTitle=191 205 219 Menu=240 240 240 Window=255 255 255 WindowFrame=100 100 100 MenuText=0 0 0 WindowText=0 0 0 TitleText=0 0 0 ActiveBorder=180 180 180 InactiveBorder=244 247 252 AppWorkspace=171 171 171 Hilight=0 120 215 HilightText=255 255 255 ButtonFace=240 240 240 ButtonShadow=160 160 160 GrayText=109 109 109 ButtonText=0 0 0 InactiveTitleText=0 0 0 ButtonHilight=255 255 255 ButtonDkShadow=105 105 105 ButtonLight=227 227 227 InfoText=0 0 0 InfoWindow=255 255 225 ButtonAlternateFace=0 0 0 HotTrackingColor=0 102 204 GradientActiveTitle=185 209 234 GradientInactiveTitle=215 228 242 MenuHilight=0 120 215 MenuBar=240 240 240 -------------------------------------------------------------------------- 用Custom.theme的这段内容替换scz.theme的相应内容,稍做修改: -------------------------------------------------------------------------- [Control Panel\Colors] ... Window=192 192 192 ... -------------------------------------------------------------------------- 然后资源管理器的背景色也变成"192 192 192"。RGB值是从"画图"中取的,对应浅灰。 这样干的一个额外福利是右下角的"显示桌面"变大了,跟Win7差不多大。 Personalize Colors High contrast settings scz 在此可视化调整颜色。可以一开始就来这里调整背景色和其他位置的颜色,但我没那 样干,随个人喜好吧。 注意到注册表项: -------------------------------------------------------------------------- Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes] "InstallVisualStyleColor"="NormalColor" "InstallVisualStyleSize"="NormalSize" "LastHighContrastTheme"="C:\\Users\\scz\\AppData\\Local\\Microsoft\\Windows\\Themes\\scz.theme" "ThemeChangesDesktopIcons"=dword:00000000 "ThemeChangesMousePointers"=dword:00000001 "WallpaperSetFromTheme"=dword:00000001 "ColorSetFromTheme"=dword:00000001 "CurrentTheme"="C:\\Users\\scz\\AppData\\Local\\Microsoft\\Windows\\Themes\\scz.theme" "SetupVersion"="10" [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\HighContrast] "Pre-High Contrast Scheme"="C:\\Windows\\resources\\Themes\\aero.theme" [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize] "ColorPrevalence"=dword:00000000 "EnableTransparency"=dword:00000000 -------------------------------------------------------------------------- 另有几个注册表项: -------------------------------------------------------------------------- Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Control Panel\Colors] "Window"="255 255 255" [HKEY_CURRENT_USER\Control Panel\Desktop\Colors] "Window"="255 255 255" -------------------------------------------------------------------------- reg.exe query "HKCU\Control Panel\Colors" /v Window reg.exe add "HKCU\Control Panel\Colors" /v Window /t REG_SZ /d "192 192 192" /f 如果直接这样改,记事本的背景色会变成浅灰,但资源管理器的背景色依然是亮白。 上面说的都是LTSB版本,非LTSB版本需要直接改: %LOCALAPPDATA%\Microsoft\Windows\Themes\Custom.theme C:\Users\scz\AppData\Local\Microsoft\Windows\Themes\Custom.theme 我是把LTSB版本的scz.theme直接复制成非LTSB版本的Custom.theme,最后内容如下: -------------------------------------------------------------------------- ; Copyright Microsoft Corp. [Theme] ; High Contrast White - IDS_THEME_DISPLAYNAME_HCWHITE DisplayName=scz ThemeId={4B7C4555-40E8-4B61-9C57-030EAED1DFAD} ; Computer - SHIDI_SERVER [CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon] DefaultValue=%SystemRoot%\System32\imageres.dll,-109 ; UsersFiles - SHIDI_USERFILES [CLSID\{59031A47-3F72-44A7-89C5-5595FE6B30EE}\DefaultIcon] DefaultValue=%SystemRoot%\System32\imageres.dll,-123 ; Network - SHIDI_MYNETWORK [CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\DefaultIcon] DefaultValue=%SystemRoot%\System32\imageres.dll,-25 ; Recycle Bin - SHIDI_RECYCLERFULL SHIDI_RECYCLER [CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon] Full=%SystemRoot%\System32\imageres.dll,-54 Empty=%SystemRoot%\System32\imageres.dll,-55 [Control Panel\Colors] Scrollbar=200 200 200 Background=3 131 135 ActiveTitle=153 180 209 InactiveTitle=191 205 219 Menu=240 240 240 Window=192 192 192 WindowFrame=100 100 100 MenuText=0 0 0 WindowText=0 0 0 TitleText=0 0 0 ActiveBorder=180 180 180 InactiveBorder=244 247 252 AppWorkspace=171 171 171 Hilight=0 120 215 HilightText=255 255 255 ButtonFace=240 240 240 ButtonShadow=160 160 160 GrayText=109 109 109 ButtonText=0 0 0 InactiveTitleText=0 0 0 ButtonHilight=255 255 255 ButtonDkShadow=105 105 105 ButtonLight=227 227 227 InfoText=0 0 0 InfoWindow=255 255 225 ButtonAlternateFace=0 0 0 HotTrackingColor=0 102 204 GradientActiveTitle=185 209 234 GradientInactiveTitle=215 228 242 MenuHilight=0 120 215 MenuBar=240 240 240 [Control Panel\Cursors] Arrow=%SystemRoot%\cursors\aero_arrow.cur Help=%SystemRoot%\cursors\aero_helpsel.cur AppStarting=%SystemRoot%\cursors\aero_working.ani Wait=%SystemRoot%\cursors\aero_busy.ani NWPen=%SystemRoot%\cursors\aero_pen.cur No=%SystemRoot%\cursors\aero_unavail.cur SizeNS=%SystemRoot%\cursors\aero_ns.cur SizeWE=%SystemRoot%\cursors\aero_ew.cur Crosshair= IBeam= SizeNWSE=%SystemRoot%\cursors\aero_nwse.cur SizeNESW=%SystemRoot%\cursors\aero_nesw.cur SizeAll=%SystemRoot%\cursors\aero_move.cur UpArrow=%SystemRoot%\cursors\aero_up.cur DefaultValue=Windows Aero Hand=%SystemRoot%\cursors\aero_link.cur Link= [Control Panel\Desktop] Wallpaper= TileWallpaper=0 WallpaperStyle=10 Pattern= [VisualStyles] Path=%SystemRoot%\resources\themes\Aero\AeroLite.msstyles ColorStyle=NormalColor Size=NormalSize HighContrast=4 [boot] SCRNSAVE.EXE= [MasterThemeSelector] MTSM=RJSPBS [Sounds] ; IDS_SCHEME_DEFAULT SchemeName=@%SystemRoot%\System32\mmres.dll,-800 -------------------------------------------------------------------------- 上例视觉效果很小众化,浓浓的末日景象,如果你手欠地尝试过,就知道我在说啥。