3 ms·
The sample app (the color contrast stuff) hurt my feelings a bit. I used to work on an app that needed to do something similar and I ended up fighting with the
by shados 8y ago
The sample app (the color contrast stuff) hurt my feelings a bit. I used to work on an app that needed to do something similar and I ended up fighting with the YIQ formula (it really doesn't work for a lot of cases). Playing with the sample just a bit and I ended up replicating what had taken me weeks to do back in the days...
- axel180 8y agoThis was good, correct? I'd love to hear what your use case was, like which colors didn't work, etc.
- shados 8y agoHaha, sorry if it was unclear, my tone was in jest. Yeah, basically what Im trying to say is that this is awesome. It was several years ago so I don't have my old code anymore (different job), but it was in the printing industry, where we wanted to warn customers that their choices of color were...dubious. However, it's extremely subjective. An example is certain shades of red/orange. The formula might tell you that using white text is a bad idea, but they're really the same to read, and white looks better. One thing I'd have to play around more than my free time allows, but I had to deal with back then, was backgrounds with multiple color. Where it got really tricky is when the text overlaps multiple colors, you have to decide if you're seeing enough of the text that one foreground color is ok, or if it's too much and you have to say "no". It was incredibly tricky to do, especially with things like antialiasing involved. Training a model with that data probably would give much better results than my tweaked formulas of old.