[MOD] Adding Accent Colors properly (the OEM way)

HD2Owner

Inactive Recognized Developer
Oct 9, 2009
2,340
2,470
0
Neuhausen am Rheinfall
hi

after i have seen that people actually edit the 20 microsoft accents (should never be done; breaks system consistency)...
i tried to figure out how to add custom accents the proper way (just like Nokia and other OEM's are doing it).
up to 4 OEM accents can be added officially. see here:
https://dev.windowsphone.com/en-US/OEM/docs/Customization/Themes_and_accent_colors

requirements:
a wp81 device with registry access (i use FurballTheGreat's TelnetD to do it from pc)

be aware:
some devices only have the 20 ms accents and some devices have one or more OEM-Accent(s) already.
keep that in mind before applying mods.
if your device has 1 OEM accent already you might only want to add 2/3/4 OEM Accent to keep the device one for consistency.
my device came without any OEM accent color so i could add 4. :)

latest telnetD has script support so i made a script. just edit the Color and Complementary color code values.
you just have to turn the hex color value FFXXXXXX (X's represent the RGB color code) into decimal to apply them.
you can also do it all manually of course with telnetd.

Warning:
if the one or more color code format is wrong, the wp might crash on accent picker screen and not boot anymore (hard-reset needed). be aware when editing.

here is the script (command to run in telnetd: runfrom http://pastebin.com/raw.php?i=65SevRa7):
Code:
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\1"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\1\DisplayName" string "@UIXMobileRes.dll,-10018"
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\1\Theme0"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\1\Theme0\Color" dword 4278203289
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\1\Theme0\ComplementaryColor" dword 4278198368
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\1\Theme1"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\1\Theme1\Color" dword 4278203289
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\1\Theme1\ComplementaryColor" dword 4278198368
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\2"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\2\DisplayName" string "@UIXMobileRes.dll,-10018"
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\2\Theme0"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\2\Theme0\Color" dword 4281195610
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\2\Theme0\ComplementaryColor" dword 4278225408
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\2\Theme1"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\2\Theme1\Color" dword 4281195610
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\2\Theme1\ComplementaryColor" dword 4278225408
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\3"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\3\DisplayName" string "@UIXMobileRes.dll,-10018"
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\3\Theme0"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\3\Theme0\Color" dword 4280624421
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\3\Theme0\ComplementaryColor" dword 4280624421
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\3\Theme1"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\3\Theme1\Color" dword 4280624421
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\3\Theme1\ComplementaryColor" dword 4280624421
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\4"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\4\DisplayName" string "@UIXMobileRes.dll,-10018"
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\4\Theme0"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\4\Theme0\Color" dword 4278209888
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\4\Theme0\ComplementaryColor" dword 4278209888
reg mkkey "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\4\Theme1"
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\4\Theme1\Color" dword 4278209888
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\Accents\4\Theme1\ComplementaryColor" dword 4278209888
reg set "HKLM\Software\Microsoft\Shell\OEM\Theme\OEMDefaultTheme" dword 1
if you want to edit them, edit the script, upload to pastebin, switch to raw mode and copy/paste the URL in telnetD.
like: "runfrom URL"

note:
i abuse the ms dll that is responsible for accent color names and its translations (so it can be done without Filesystem access)
so all custom accents have the name "lime". but who cares... :laugh:

screenshot:


thanks:
FurballTheGreat, whole XDA Dev Team and everyone that is hacking/modding devices for good purposes. :highfive:
 

Attachments

Last edited:
Dec 20, 2014
18
42
0
Just a quick note on the expected output from on the WPTelnetD command prompt. If you see "ERROR: Error calling RegCreateKeyExA 5" this means either access denied or key already exists. In the case of this script if the accent keys exist already you will get a number of these lines. This is normal and expected behaviour. See the following output to make this clear:-
Code:
******************************************
*    Welcome to the WP8 Telnet Server -  *
******************************************
This instance is hosted inside the app process.

D:\WPSystem\Apps\{E69A2877-59B8-43ED-898D-554FBC4B8B2B}\Install>runfrom http://pastebin.com/raw.php?i=65SevRa7
Adding 4 HD2O Accent Colors
ERROR: Error calling RegCreateKeyExA 5
ERROR: Error calling RegCreateKeyExA 5
ERROR: Error calling RegCreateKeyExA 5
ERROR: Error calling RegCreateKeyExA 5
ERROR: Error calling RegCreateKeyExA 5
ERROR: Error calling RegCreateKeyExA 5
Script Completed
D:\WPSystem\Apps\{E69A2877-59B8-43ED-898D-554FBC4B8B2B}\Install>
 
  • Like
Reactions: HD2Owner

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,930
0
Seattle
Very cool, but why use the string table in UIXMobileRes.dll at all? That's a useful thing if you're trying to make it internationalize easily, I guess, but you could just as easily give the colors names in English and let people translate it for themselves if they don't want English names. A string that doesn't start with an @ sign won't be interpreted as a stringtable lookup, just as a literal value.
 
  • Like
Reactions: ceesheim
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone