When writing code to dynamically create background colours and text colours, there is always the potential those two colours will not look appropriate together, and will either render the text illegible or create oscillating text.
Enter Split Brain .org‘s Color Contrast Checker
It’s a very helpful script, to prevent some illegible dynamic text colors from occurring and helps create visible text in PHP.