Ever wondered how to make your iOS header nav buttons actually the right color? If you’ve ever edited Navigation Bar tintColor, you’ll know that that color isn’t actually what’s displayed on screen.
Instead, Apple has a secret formula. For a given input RGB value between 0 and 255, a different scaling factor is applied:
As you can see, the scaling factor’s obviously not linear. In fact, it is *drumroll*….
x = actual color value tint color value = -0.0016 * x^2 + 1.2686 * x + 33.97
Formula courtesy of Excel. Before (note the mismatched colors between the header and the buttons):

and after:

Now, I don’t want to mislead you, this formula is only a polynomial regression on values that were produced for me – but it should help save you some time!
