However, despite of it being said that this is automatic, there is is a way to influence decision of system on deciding with a colour. And it is actually a simple one. To do so, go to "Screen - Desktop wallpaper". As you've probably noticed, there is a default wallpaper collection named "Solid colours". It can't be get rid of, can't be edited much, and provides a number of generic colours. But that's not the important part here. Switching desktop wallpaper to a solid black/white colour from said section leaves the system no choice but to pick opposite colour. Now, the unsaid part is, that for larger images with mixed luminance system will not recalculate icon label colour, meaning that what has been picked via "Solid colours", stays intact. Thus, changing icon label colour from black to white is just a matter of switching wallpaper to solid black colour, and switching back. That helps:
Hopefully this was useful.