Specify a default color
Spécifier une couleur par défaut
Explanation
This policy setting controls the default color for window frames when the user does not specify a color.
If you enable this policy setting and specify a default color, this color is used in glass window frames, if the user does not specify a color.
If you disable or do not configure this policy setting, the default internal color is used, if the user does not specify a color.
Note: This policy setting can be used in conjunction with the "Prevent color changes of window frames" setting, to enforce a specific color for window frames that cannot be changed by users.
Ce paramètre de stratégie contrôle la couleur par défaut des cadres de fenêtres lorsque l’utilisateur ne spécifie pas de couleur.
Si vous activez ce paramètre de stratégie et spécifiez une couleur par défaut, cette couleur est utilisée pour les cadres de fenêtres transparents, si l’utilisateur ne spécifie pas de couleur.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, la couleur interne par défaut est utilisée, si l’utilisateur ne spécifie pas de couleur.
Remarque : ce paramètre de stratégie peut être utilisé avec le paramètre « Empêcher les modifications de couleur des cadres de fenêtres », pour imposer une couleur spécifique des cadres de fenêtres ne pouvant pas être modifiée par les utilisateurs.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DWM- Value name
DefaultColorizationColorState
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: DWM/DwmDefaultColorizationColor_2
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DWM'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DefaultColorizationColorState' -Value 1 -Type DWord
# Alpha
Set-ItemProperty -Path $k -Name 'DefaultColorizationColorAlpha' -Value 0 -Type DWord # maximum 255
# Red
Set-ItemProperty -Path $k -Name 'DefaultColorizationColorRed' -Value 0 -Type DWord # maximum 255
# Green
Set-ItemProperty -Path $k -Name 'DefaultColorizationColorGreen' -Value 0 -Type DWord # maximum 255
# Blue
Set-ItemProperty -Path $k -Name 'DefaultColorizationColorBlue' -Value 0 -Type DWord # maximum 255Disable
# Disable: DWM/DwmDefaultColorizationColor_2
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DWM'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DefaultColorizationColorState' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": DWM/DwmDefaultColorizationColor_2
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DWM'
Remove-ItemProperty -Path $k -Name 'DefaultColorizationColorState' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'DefaultColorizationColorAlpha' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'DefaultColorizationColorRed' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'DefaultColorizationColorGreen' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'DefaultColorizationColorBlue' -ErrorAction SilentlyContinueOptions (4)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| AlphaDwmDefaultColorizationColorAlpha | Numeric boxdecimal | DefaultColorizationColorAlpha | REG_DWORD | Required · Max: 255 |
| RedRougeDwmDefaultColorizationColorRed | Numeric boxdecimal | DefaultColorizationColorRed | REG_DWORD | Required · Max: 255 |
| GreenVertDwmDefaultColorizationColorGreen | Numeric boxdecimal | DefaultColorizationColorGreen | REG_DWORD | Required · Max: 255 |
| BlueBleuDwmDefaultColorizationColorBlue | Numeric boxdecimal | DefaultColorizationColorBlue | REG_DWORD | Required · Max: 255 |