// HACKER NEWS — CYBERSECURITY
Ranking the Most Brilliantly Colored Birds with Data
After I finished the project of my last post I still had a giant collection of processed bird color data from BirdColorBase where every way I sliced it revealed new and mind-blowing birds. The minimal treatment I gave in that post just wasn’t enough. I had to dig in more.
I set out to find the brightest, most brilliant, most colorful birds. I’m not going to make you wade through an essay’s worth of math and discussion before I show you my top 40. Here it is.
This is ranked with math, but it is subjective math. If you disagree with the list, if you feel I have disrespected your favorites, or omitted some obvious contender, read on to see if I have treated your most beloved bird fairly, and what it even means in principle for a subjective ranking to be fair. I’m going to walk you through how I turned my subjective preferences into math. In the process we’ll touch on a number of common functions that are useful in information retrieval, but rather than ranking documents based on their relevance or quality, we’re ranking birds by their color.
Where our story left off, we had found all the birds with plumage samples outside of sRGB and display-P3, the birds for whom at least some part of them is undisplayable on a conventional screen. This yielded pretty big lists of birds, so a natural next step to ask is, which are the brightest? What birds are behind all those dots at the edges? For that we need a notion of what it means to be “at the edge.” The simplest is the convex hull.
There are a few problems here. The first is that there are too few birds. I want to see more birds than that. The second is that there are a lot of regions of the boundary very sparsely populated with birds. I want to see some magenta birds, but because the space of bird color curves inward there, no convex hull can show me.
There is a clever generalization of the convex hull that can improve this, called the alpha shape. The gist of it is that rather than prohibiting any concavities in your hull, you allow concavities only up to a given size. If you can carve out a region with circles of radius more than 1/alpha without snaring any of the points in your circle, then you add the points on the boundary of the circle to your hull.
This is much better. We have a lot of birds evenly spaced on the boundary now, and know now where to find all the most extreme colors that birds can show us. As a ranking of the most brilliant birds however, there are still two problems.
First, this is showing the colors of individual plumage samples from birds, not full birds. If you are an entirely beige bird with one brilliant spot, you can easily earn a spot on this list. No offense to the fire fronted serin, its forehead spot is indeed very fiery, but one spot is just not enough. Or the cut throat finch, great Halloween costume and fantastic name, but we’re looking for a bit more than just a permanently bloody throat.
The second problem is that this is scoring colors based on their saturation, but not their brightness. A bird that manages to achieve the same color of green but reflects twice as much light is meaningfully “more green,” and I want the ranking to reward that. This plot filters out feathers that were too dark to have a meaningful color, but to really rank birds, I’d like to incorporate brightness in a more continuous way rather than just a binary threshold that means “definitely not black.”
The CIE colorspace has a transformation which extracts a component, chroma, that is very similar to what we call vibrance. It rewards both the saturation of the color, and the amount of light the color reflects, so this is a promising place to start. You might expect this to be some simple function of the quantities of light at different wavelengths, but it is quite complicated and abstruse. You first convert the spectrum to CIEXYZ, then CIELAB, then to CIElCh, using functions and parameters set empirically based on properties of the human eye without any intuitive interp