Compare commits

..

2 commits

Author SHA1 Message Date
X9 Dev
917fc89068 docs(web): reflect AccentPalette / all-profile theme + BackInfo bg fix
All checks were successful
release / build-and-release (push) Successful in 38s
- spec step-04: AccentPalette + Custom mode note, theme applied across Default
  hive / HKCU / HKU\.DEFAULT.
- spec step-07: BackInfo background #223B47 via BackgroundColor=2243399 (RGB).
- descriptions.json: update 04 accent item; add 07 background item.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 10:39:57 +02:00
X9 Dev
4d08d0cd46 fix: reliable accent color in all profiles + BackInfo background
- 04 profile: write AccentPalette (REG_BINARY, 8 shades derived from #223B47)
  alongside AccentColor/AccentColorMenu. Without AccentPalette, Win11 ignores
  the custom accent on Start/taskbar and falls back to the default - the cause
  of "colors not applied everywhere". Also mirror the full theme + accent into
  HKU\.DEFAULT (lock/welcome screen, system context) on top of the Default hive
  and current user, so all profiles match. Mode stays Custom (dark system,
  light apps); ColorPrevalence on for Start/taskbar and title bars/borders.
- BackInfo.ini: BackgroundColor 4668194 -> 2243399. BackInfo reads the value as
  0xRRGGBB (RGB), not COLORREF/BGR, so #223B47 = 0x223B47 = 2243399; the BGR
  value rendered with red/blue swapped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 10:39:57 +02:00
4 changed files with 71 additions and 7 deletions

View file

@ -56,8 +56,9 @@
;; ;;
[General] [General]
; #223B47 in COLORREF (0x00BBGGRR): R=34 G=59 B=71 = 71*65536 + 59*256 + 34 = 4668194 ; #223B47 read as 0xRRGGBB decimal: BackInfo uses RGB order here (NOT COLORREF/BGR),
BackgroundColor = 4668194 ; so 0x223B47 = 2243399. The previous BGR value (4668194) rendered with R/B swapped.
BackgroundColor = 2243399
; AutoBackground=0: do NOT read live desktop color - unreliable during deployment ; AutoBackground=0: do NOT read live desktop color - unreliable during deployment
; (live session may not yet reflect the registry background color change) ; (live session may not yet reflect the registry background color change)
AutoBackground = 0 AutoBackground = 0

View file

@ -104,8 +104,35 @@ function Set-ProfileReg {
} }
} }
# Accent color #223B47 stored as ABGR DWORD: 0xFF473B22 # Accent color #223B47 (R=34 G=59 B=71) stored as ABGR DWORD: 0xFF473B22
$AccentColorABGR = 0xFF473B22 $AccentColorABGR = 0xFF473B22
$AccentR = 0x22; $AccentG = 0x3B; $AccentB = 0x47
# Build the 8-shade AccentPalette that Settings writes under Explorer\Accent.
# Without it Win11 ignores the custom accent on Start/taskbar and falls back to
# the default - the root cause of "colors not applied everywhere". Layout:
# Light3, Light2, Light1, Accent(base, index 3), Dark1..Dark4. Each entry RGBA.
function Get-AccentPalette {
param([int]$R, [int]$G, [int]$B)
$tints = @(0.70, 0.45, 0.20) # light3 (lightest) -> light1
$shades = @(0.25, 0.45, 0.65, 0.85) # dark1 -> dark4
$bytes = New-Object System.Collections.Generic.List[byte]
foreach ($t in $tints) {
$bytes.Add([byte][math]::Round($R + (255 - $R) * $t))
$bytes.Add([byte][math]::Round($G + (255 - $G) * $t))
$bytes.Add([byte][math]::Round($B + (255 - $B) * $t))
$bytes.Add(0xFF)
}
$bytes.Add([byte]$R); $bytes.Add([byte]$G); $bytes.Add([byte]$B); $bytes.Add(0xFF) # base accent
foreach ($s in $shades) {
$bytes.Add([byte][math]::Round($R * (1 - $s)))
$bytes.Add([byte][math]::Round($G * (1 - $s)))
$bytes.Add([byte][math]::Round($B * (1 - $s)))
$bytes.Add(0xFF)
}
return ,([byte[]]$bytes.ToArray())
}
$AccentPalette = Get-AccentPalette $AccentR $AccentG $AccentB
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# Load Default profile hive # Load Default profile hive
@ -331,6 +358,11 @@ $pinList
Set-ProfileReg -SubKey "Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" ` Set-ProfileReg -SubKey "Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" `
-Name "StartColorMenu" -Value $AccentColorABGR -Type "DWord" -Name "StartColorMenu" -Value $AccentColorABGR -Type "DWord"
# AccentPalette - required for Win11 to actually honor the accent on Start
# and taskbar (without it the custom color is dropped for the default).
Set-ProfileReg -SubKey "Software\Microsoft\Windows\CurrentVersion\Explorer\Accent" `
-Name "AccentPalette" -Value $AccentPalette -Type "Binary"
# Wallpaper - solid color #223B47 (BackInfo overwrites on logon) # Wallpaper - solid color #223B47 (BackInfo overwrites on logon)
Set-ProfileReg -SubKey "Control Panel\Colors" ` Set-ProfileReg -SubKey "Control Panel\Colors" `
-Name "Background" -Value "34 59 71" -Type "String" -Name "Background" -Value "34 59 71" -Type "String"
@ -341,6 +373,34 @@ $pinList
Set-ProfileReg -SubKey "Control Panel\Desktop" ` Set-ProfileReg -SubKey "Control Panel\Desktop" `
-Name "TileWallpaper" -Value "0" -Type "String" -Name "TileWallpaper" -Value "0" -Type "String"
# Mirror the theme + accent into HKU\.DEFAULT so the lock/welcome screen and
# system-context UI use the same branding (covers "all profiles", not just
# newly created users which inherit from the Default hive above).
$defaultColors = @(
@{ Key="Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"; Name="SystemUsesLightTheme"; Val=0; Type="DWord" },
@{ Key="Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"; Name="AppsUseLightTheme"; Val=1; Type="DWord" },
@{ Key="Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"; Name="ColorPrevalence"; Val=1; Type="DWord" },
@{ Key="Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"; Name="EnableTransparency"; Val=0; Type="DWord" },
@{ Key="Software\Microsoft\Windows\DWM"; Name="AccentColor"; Val=$AccentColorABGR; Type="DWord" },
@{ Key="Software\Microsoft\Windows\DWM"; Name="ColorizationColor"; Val=$AccentColorABGR; Type="DWord" },
@{ Key="Software\Microsoft\Windows\DWM"; Name="ColorizationAfterglow";Val=$AccentColorABGR; Type="DWord" },
@{ Key="Software\Microsoft\Windows\DWM"; Name="ColorPrevalence"; Val=1; Type="DWord" },
@{ Key="Software\Microsoft\Windows\CurrentVersion\Explorer\Accent"; Name="AccentColorMenu"; Val=$AccentColorABGR; Type="DWord" },
@{ Key="Software\Microsoft\Windows\CurrentVersion\Explorer\Accent"; Name="StartColorMenu"; Val=$AccentColorABGR; Type="DWord" },
@{ Key="Software\Microsoft\Windows\CurrentVersion\Explorer\Accent"; Name="AccentPalette"; Val=$AccentPalette; Type="Binary" }
)
foreach ($c in $defaultColors) {
$cp = "Registry::HKU\.DEFAULT\$($c.Key)"
try {
if (-not (Test-Path $cp)) { New-Item -Path $cp -Force -ErrorAction Stop | Out-Null }
Set-ItemProperty -Path $cp -Name $c.Name -Value $c.Val -Type $c.Type -Force -ErrorAction Stop
}
catch {
Write-Log " .DEFAULT color $($c.Key)\$($c.Name) failed - $_" -Level WARN
}
}
Write-Log " Theme/accent mirrored to HKU\.DEFAULT" -Level OK
# =================================================================== # ===================================================================
# KEYBOARD LAYOUTS - Czech primary, US secondary # KEYBOARD LAYOUTS - Czech primary, US secondary
# =================================================================== # ===================================================================

View file

@ -68,7 +68,7 @@
"start-menu-zakaz-bing-vyhledavani": "DisableSearchBoxSuggestions = 1 in Software\\Policies\\Microsoft\\Windows. Disables web search, Bing suggestions, and online results in Start menu search. Search returns only local apps, files, and settings.", "start-menu-zakaz-bing-vyhledavani": "DisableSearchBoxSuggestions = 1 in Software\\Policies\\Microsoft\\Windows. Disables web search, Bing suggestions, and online results in Start menu search. Search returns only local apps, files, and settings.",
"copilot-zakaz-turnoffwindowscopilot-1": "TurnOffWindowsCopilot = 1 in SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot. Disables the Windows Copilot sidebar entirely. Not suitable for most client environments (data privacy, AI usage policies).", "copilot-zakaz-turnoffwindowscopilot-1": "TurnOffWindowsCopilot = 1 in SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot. Disables the Windows Copilot sidebar entirely. Not suitable for most client environments (data privacy, AI usage policies).",
"numlock-zapnout-pri-startu-initialkeyboa": "InitialKeyboardIndicators = 2 in Default profile. Ensures NumLock is enabled when Windows starts. Standard expectation for users working with numeric data - prevents confusion on data entry.", "numlock-zapnout-pri-startu-initialkeyboa": "InitialKeyboardIndicators = 2 in Default profile. Ensures NumLock is enabled when Windows starts. Standard expectation for users working with numeric data - prevents confusion on data entry.",
"accent-barva-na-titulnich-listech-colorp": "ColorPrevalence = 1 in Personalize key. Shows the X9.cz accent color (#223B47) on window title bars and borders. Gives all windows a consistent branded appearance.", "accent-barva-na-titulnich-listech-colorp": "ColorPrevalence = 1 (in both Themes\\Personalize and DWM) shows the X9.cz accent color (#223B47) on Start, taskbar, window title bars and borders, in Custom mode (dark system + light apps). The exact accent is set via AccentColor (0xFF473B22 ABGR) AND AccentPalette (REG_BINARY, 8 shades) - the palette is required or Win11 drops the custom accent on Start/taskbar and falls back to the default. Applied to the Default hive (new users), the current user (HKCU) and HKU\\.DEFAULT (lock/welcome screen, system context) so the theme is consistent across all profiles.",
"onedrive-runonce-klic-je-tady-smazat": "REMOVED. The RunOnce key deletion and Explorer namespace CLSID removal were deleted - those registry tweaks prevented a freshly installed OneDrive (e.g. for M365) from launching. OneDrive AppX uninstall in step 01 is intentional; blocking re-launch is not.", "onedrive-runonce-klic-je-tady-smazat": "REMOVED. The RunOnce key deletion and Explorer namespace CLSID removal were deleted - those registry tweaks prevented a freshly installed OneDrive (e.g. for M365) from launching. OneDrive AppX uninstall in step 01 is intentional; blocking re-launch is not.",
"explorer-showrecent-0-showfrequent-0": "ShowRecent=0 and ShowFrequent=0 in HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer. Hides Recent files and Frequent folders from Quick Access. Privacy improvement and cleaner File Explorer on fresh deployments.", "explorer-showrecent-0-showfrequent-0": "ShowRecent=0 and ShowFrequent=0 in HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer. Hides Recent files and Frequent folders from Quick Access. Privacy improvement and cleaner File Explorer on fresh deployments.",
"explorer-fullpath-1-cabinetstate": "FullPath=1 in HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState. Displays the full directory path (e.g. C:\\Users\\jan\\Documents\\Projekty) in the File Explorer title bar instead of just the folder name.", "explorer-fullpath-1-cabinetstate": "FullPath=1 in HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState. Displays the full directory path (e.g. C:\\Users\\jan\\Documents\\Projekty) in the File Explorer title bar instead of just the folder name.",
@ -82,7 +82,8 @@
"kopirovat-assets-backinfo-do-program-fil": "Copies all files from assets\\Backinfo\\ to C:\\Program Files\\Backinfo\\. Includes BackInfo.exe, BackInfo.ini, and backinfo_W11.ps1. Creates the target directory if it does not exist.", "kopirovat-assets-backinfo-do-program-fil": "Copies all files from assets\\Backinfo\\ to C:\\Program Files\\Backinfo\\. Includes BackInfo.exe, BackInfo.ini, and backinfo_W11.ps1. Creates the target directory if it does not exist.",
"registry-osname-hklm-software-backinfo": "Detects Windows build number and edition, writes OSName string to HKLM\\SOFTWARE\\BackInfo\\OSName (and WOW6432Node). BackInfo.ini references %OSName% to display the correct OS on the wallpaper.", "registry-osname-hklm-software-backinfo": "Detects Windows build number and edition, writes OSName string to HKLM\\SOFTWARE\\BackInfo\\OSName (and WOW6432Node). BackInfo.ini references %OSName% to display the correct OS on the wallpaper.",
"startup-shortcut-backinfo-exe": "Creates a shortcut at C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\BackInfo.lnk pointing to C:\\Program Files\\Backinfo\\BackInfo.exe. Ensures BackInfo starts for every user on logon.", "startup-shortcut-backinfo-exe": "Creates a shortcut at C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp\\BackInfo.lnk pointing to C:\\Program Files\\Backinfo\\BackInfo.exe. Ensures BackInfo starts for every user on logon.",
"07-desktop-info-ps1-smazat-nahrazeno": "07-desktop-info.ps1 is superseded by this script. BackInfo.exe is the preferred approach - stable on Win10 and Win11, configurable via INI, already present in assets." "07-desktop-info-ps1-smazat-nahrazeno": "07-desktop-info.ps1 is superseded by this script. BackInfo.exe is the preferred approach - stable on Win10 and Win11, configurable via INI, already present in assets.",
"backinfo-pozadi-223b47": "BackInfo.ini sets a solid #223B47 background via BackgroundColor = 2243399. BackInfo reads this value as 0xRRGGBB (RGB order), not a Windows COLORREF (BGR), so 0x223B47 = 2243399; the earlier BGR value 4668194 rendered with red and blue swapped."
} }
}, },
"07-desktop-info": { "07-desktop-info": {

View file

@ -673,8 +673,9 @@
<tr class="flag-done"><td>Klavesnice: CZ primarni + US sekundarni</td><td>Field fix &ndash; Set-WinUserLanguageList (cs-CZ + en-US) pro aktualniho uzivatele; Preload (<code>1=00000405</code> CZ, <code>2=00000409</code> US) do Default hive i <code>HKU\.DEFAULT</code> (welcome screen + systemove ucty). Aplikuje se vzdy automaticky.</td></tr> <tr class="flag-done"><td>Klavesnice: CZ primarni + US sekundarni</td><td>Field fix &ndash; Set-WinUserLanguageList (cs-CZ + en-US) pro aktualniho uzivatele; Preload (<code>1=00000405</code> CZ, <code>2=00000409</code> US) do Default hive i <code>HKU\.DEFAULT</code> (welcome screen + systemove ucty). Aplikuje se vzdy automaticky.</td></tr>
<tr class="flag-done"><td>System tema (taskbar, Start): Dark</td><td>OK</td></tr> <tr class="flag-done"><td>System tema (taskbar, Start): Dark</td><td>OK</td></tr>
<tr class="flag-done"><td>Aplikacni tema: Light</td><td>OK</td></tr> <tr class="flag-done"><td>Aplikacni tema: Light</td><td>OK</td></tr>
<tr class="flag-done"><td>Accent barva: #223B47 (tmave modroseda)</td><td>AccentColor DWORD = 0xFF473B22 (ABGR)</td></tr> <tr class="flag-done"><td>Accent barva: #223B47 (tmave modroseda)</td><td>AccentColor DWORD = 0xFF473B22 (ABGR) + <strong>AccentPalette</strong> (REG_BINARY, 8 odstinu). Bez AccentPalette Win11 vlastni accent na Startu/taskbaru ignoruje a spadne na default &ndash; proto se barvy „neaplikovaly vsude".</td></tr>
<tr class="flag-done"><td>Accent barva na Start a taskbaru (ColorPrevalence = 1)</td><td>OK</td></tr> <tr class="flag-done"><td>Accent barva na Start a taskbaru (ColorPrevalence = 1)</td><td>Themes\Personalize i DWM\ColorPrevalence = 1 (Start/taskbar i zahlavi a ohraniceni oken). Rezim Custom: tmavy system + svetle aplikace.</td></tr>
<tr class="flag-done"><td>Motiv aplikovan ve vsech profilech</td><td>Default hive (novi uzivatele) + aktualni HKCU + <code>HKU\.DEFAULT</code> (lock/welcome screen, systemovy kontext).</td></tr>
<tr class="flag-done"><td>Pruhlednost: vypnuta (EnableTransparency = 0)</td><td>OK</td></tr> <tr class="flag-done"><td>Pruhlednost: vypnuta (EnableTransparency = 0)</td><td>OK</td></tr>
<tr class="flag-done"><td>Tapeta: jednobarevna #223B47; Wallpaper="" v default hive</td><td>BackInfo prepise tapetu svym BMP; prazdny retezec = solid barva, ne cerna plocha</td></tr> <tr class="flag-done"><td>Tapeta: jednobarevna #223B47; Wallpaper="" v default hive</td><td>BackInfo prepise tapetu svym BMP; prazdny retezec = solid barva, ne cerna plocha</td></tr>
<tr class="flag-done"><td>OneDrive RunOnce klic odstranen</td><td>Odstraneni branil reinstalaci pres M365 &ndash; klice smazany ze skriptu</td></tr> <tr class="flag-done"><td>OneDrive RunOnce klic odstranen</td><td>Odstraneni branil reinstalaci pres M365 &ndash; klice smazany ze skriptu</td></tr>
@ -706,6 +707,7 @@
<tr class="flag-done"><td>Spustit <code>backinfo_W11.ps1</code> (detekce OS, registry, Startup)</td><td>Logika inlinovana v 07-backinfo.ps1</td></tr> <tr class="flag-done"><td>Spustit <code>backinfo_W11.ps1</code> (detekce OS, registry, Startup)</td><td>Logika inlinovana v 07-backinfo.ps1</td></tr>
<tr class="flag-done"><td>BackInfo.exe v assets/Backinfo/ k dispozici</td><td>Hotovo</td></tr> <tr class="flag-done"><td>BackInfo.exe v assets/Backinfo/ k dispozici</td><td>Hotovo</td></tr>
<tr class="flag-done"><td>BackInfo auto-start pri kazdem logonu via Startup shortcut</td><td>Shortcut do ProgramData\StartUp vytvori 07-backinfo.ps1</td></tr> <tr class="flag-done"><td>BackInfo auto-start pri kazdem logonu via Startup shortcut</td><td>Shortcut do ProgramData\StartUp vytvori 07-backinfo.ps1</td></tr>
<tr class="flag-done"><td>Pozadi #223B47 (<code>BackgroundColor = 2243399</code>)</td><td>BackInfo bere hodnotu jako 0xRRGGBB (RGB), ne COLORREF/BGR &ndash; tj. <code>0x223B47 = 2243399</code>. Drivejsi BGR hodnota (4668194) renderovala prohozene R/B.</td></tr>
</table> </table>
<div class="note"> <div class="note">
<strong>BackInfo.ini konfiguruje:</strong> hostname (velky, centrovan), uzivatelske jmeno, <strong>BackInfo.ini konfiguruje:</strong> hostname (velky, centrovan), uzivatelske jmeno,