I have based this little guide on ViperOne which is Sense based. So things might be different on other ROM resource files.
As a lot of you out there know editing com.htc.resources.apk may cause issues when trying to decompile and compile. And when successfully compiled there probably are issues. Some don't care about it but others do.
This guide is to help anyone that successfully decompiled com.htc.resources.apk and edited the colors.xml in the res folder to use this custom colours in their theme or ROM. I changed only colors.xml and no other xml files so some things may be different if you edit other files that will compile in resources.arsc. If you have, then simply compare your resources.arsc with the stock one to see where the differences are. U can use KDiff3 or Beyond Compare to do this for example.
First. If you have any issues with decompiling and / or compiling com.htc.resources with apktool take a look at this thread http://forum.xda-developers.com/show....php?t=2229230 by @he_stheone64
or if you use Virtuous Ten Studio use the method of @Ajthescot here http://forum.xda-developers.com/show...php?p=43801810
Now, you have edited your colors.xml and compiled the apk. The apk or the resources.arsc flashes fine in your theme but you will end up with bad battery life and at medium sticking font size. What you have to do to fix this is hex edit the original resources.arsc from com.htc.resources.apk to match the changes you made in the colors.xml
This is how I do it:
Pull the resources.arsc from the original com.htc.resources.apk and place it on the desktop. Open the file in an hex editor (I use HxD Hex Editor)
To look up the beginning of the colors.xml search for e5 b5 33 (in hex it’s reversed so you probably are not going to find 33 b5 e5). It should be line 0022F3E0 for Android 4.3 and line 0022E2A0 for Android 4.4 which is the beginning of the colors.xml. On 4.4.2 it is 0022F7D0.
Now change the stock hex colours to the hex colours you have in your modified colors.xml. Work from the top to the bottom and look carefully at the ones you didn't change so you know where you are.
When you are done save the file and put the resources.arsc you just edited in the com.htc.resources.apk for your theme or ROM or in your vrtheme folder. Flash the theme and enjoy your work without issues!