Closed hackhat closed 9 years ago
I think isReadable is what you want. You could iterate over your list and stop once you find one that fits your threshold.
I know is possible, but a faster way could be possible. But this is your decision if is worth or not. I can make a pull request if you give me the ok.
Since this is a fairly specific need and has an easy workaround, I think it'd be best to not expand the API to add that function.
I know that is possible to do this with the API already provided but would be nice to have this. For example I have a list of possible colors and I would like to get the first one that is readable above a certain threshold.