Unofficial Hacker News client - receive Push Notifications on replies.

Domes (opens external site)

47 points by tosh 2 days ago | www.shelterpub.com | 14 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (4)

  1. It's a small font, but it's not whiteish, it has a contrast ratio of 6.44 [1]

    It would always be nice to have at least AAA (ratio of 7) though, I wish more people would take it seriously.

    [1] https://colourcontrast.cc/?background=f3f3f3&foreground=7551...

    Replies (1)
    1. As a non-webmaster, this is interesting. what's the math to calculate the ratio?
      Replies (1)
      1. There are plenty of comprehensive guides [1], but the basic procedure is to calculate the luminance of an RGB color value (gamma corrected) and then take the ratio with the following formula:

        C = (L1 + 0.05) / (L2 + 0.05)

        We can get into where the model breaks (the maximum contrast ratio of text on a computer is not 21), but it should be though of in the context of the fact that a website is seen on a great variety of displays of variable quality. If the contrast ratio is close to the line it is probably over the line for someone. You should aim to be inclusive and considerate and choose a contrast ratio that is likely to be legible for the majority of viewers.

        https://www.accessibility-developer-guide.com/knowledge/colo...

        Replies (1)
        1. I always get curious about wierd stuff like the 0.05 fudge factor in the above ratio. My guess, to avoid dividing by zero.