Fix thumbnail color extraction (#14464)
Fix thumbnail color extraction (#14464)

* Fix contrast calculation for thumbnail color extraction

Luminance calculation was using 0-255 RGB values instead of 0-1 sRGB values,
leading to incorrectly-computed contrast values.

Since we use ColorDiff already, just use its XYZ colorspace conversion code
to get the value.

* Require at least 3:1 contrast for both accent and foreground colors

* Lower required contrast for the accent color
gol-cha/mastodon,koba-lab/mastodon,koba-lab/mastodon,tri-star/mastodon,theoria24/mastodon,tri-star/mastodon,pinfort/mastodon,gol-cha/mastodon,theoria24/mastodon,tri-star/mastodon,theoria24/mastodon,koba-lab/mastodon,gol-cha/mastodon,theoria24/mastodon,pinfort/mastodon,pinfort/mastodon,gol-cha/mastodon,tri-star/mastodon,koba-lab/mastodon,pinfort/mastodon