79441486

Date: 2025-02-15 12:14:32
Score: 3
Natty:
Report link

Is there a reason you can't use the WCAG contrast ratio definition? Assuming your colours are within sRGB, you can calculate the relative luminance of the background colour from RGB values. You could check which foreground colour has a greater contrast with the background colour, and use that.

(It's the approach I use for the RGB text at the bottom of my colour picker)

Note that HSB's Brightness and HSL's Lightness don't represent what the eye perceives, they are just a reshaping of RGB.

Reasons:
  • Contains signature (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is there a
  • Low reputation (0.5):
Posted by: Wacton