EDIT: See bottom of post.
I've been playing around trying to figure out exactly where the OS is reading the image to determine whether or not to display white or black text.
I performed these tests on the home screen.
Using a 1136x640 blank canvas I added complete white. The home screen shows black text. Then pixel row by pixel row I added black to the image from the bottom up. Once I reached row 236px the text changed to white.
So far clarification, if you take a 1136x640 canvas and add a black mask with the dimensions 235x640 to the BOTTOM of the image, you will get black text on the home screen.
Here are my examples:
Fist screen shot shows a white background with a black bottom mask of 236x640 (1 pixel too high) and you will see the text is white with shadows:
View attachment 418761
Now with the black bottom mask correctly sized at 235x640 you can see the home screen text is black:
View attachment 418762
Here are the wallpapers I used:
235x1136
View attachment 418764
236x1136
View attachment 418763
**EDIT**
Played around a little more. As it turns out, the actual location of the black mask is irrelevant. You can place it anywhere. The important part is that it is at least 235 pixels worth of black or 36.7%
In other words, in order to display black text the wallpaper needs to be at least 63.3% white.
View attachment 418779
You should try a few other things. Add black rows from the top, add black columns from the sides. Place a black rectangle centered in the middle. Scatter different numbers of black pixels randomly on the background. Test different pure grey backgrounds ranging from white to black.
I would guess that the OS is taking some kind of mean brightness measure across all pixels to determine the color of the text. Anything more sophisticated doesn't seem worth it.