Yeah I know. It's an interesting problem though. I know I've seen this before. Aaaagh! I have old man's memory and it's driving me nuts.
Ok, as you can see I like that kind of interesting problems as well.

Got the idea last night while showering and created a quick widget. This is the logic behind this widget just in case you want to replicate it with a different app.
1. First background. It can be a plain rectangle, bigger than the text and, to avoid colour interference later, preferably the same size than the final battery bar. I used the battery bar for simplicity (FG - red/BG - white).
2. We need to cut the text out the background. Add a module with the battery level and use CLEAR as drawing mode.
3. Now we can create the text with changing colours according to the battery level. Copy the battery bar and invert the colours (FG - white/BG - red). Using XOR as drawing mode we get the not overlapping pixels (the text we cut out previously) and the result is the battery level text with the inverted colours.
4. Now we need to add the final battery progress bar. Normal colours (red/white) and OVERLAY as drawing mode, so it doesn't cover the text.
Let me know if you need any help creating this widget. Still working

