apca-introduction

The missing introduction to APCA  https://p.ce9e.org/apca-introduction/
git clone https://git.ce9e.org/apca-introduction.git

commit
2695b72560d0b6abc101937b4de58e999c47b186
parent
00ef8b24583a2279873d3c0aecc882046187b8a6
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-07-17 14:27
include contrast comparison in analysis

Diffstat

M analysis.md 33 +++++++++++++++++++++++++++------

1 files changed, 27 insertions, 6 deletions


diff --git a/analysis.md b/analysis.md

@@ -235,12 +235,33 @@ with an ambient light value of 0.4 instead of 0.05. This one is very similar
  235   235 to the APCA curves. The second column shows the differences between the APCA
  236   236 curves and this modified WCAG 2.x.
  237   237 
  238    -1 The APCA contrast formula is certainly not as obvious a choice as the one from
  239    -1 WCAG 2.x. I was not able to find much information on how it was derived. A
  240    -1 closer analysis reveals that it is actually not that different from WCAG 2.x,
  241    -1 but assumes much more ambient light. More research is needed to determine if
  242    -1 this higher ambient light value is significant or just an artifact of the
  243    -1 conversion I did.
   -1   238 I also wanted to see how the contrast results compare. I took a random sample
   -1   239 of color pairs and computed the normalized APCA contrast, WCAG 2.x contrast
   -1   240 (without removing the polarity) and the modified WCAG contrast with an ambient
   -1   241 light value of 0.4.
   -1   242 
   -1   243 ![contrast comparison](plots/contrast_comparison.png)
   -1   244 
   -1   245 In the top row we see two scatter plots that compare APCA to both WCAG
   -1   246 variants. As we can see, they correlate in both cases, but the modified WCAG
   -1   247 2.x contrast is much closer.
   -1   248 
   -1   249 In the bottom row we see two more scatter plots. This time the X axis
   -1   250 corresponds to foreground luminance and the Y axis corresponds to background
   -1   251 luminance. The color of the dots indicated the differences between the
   -1   252 respective formulas, calculated as `log(apca / wcag)`. Note that the scaling of
   -1   253 colors is different in the two plots. As we can see, the biggest differences
   -1   254 between APCA and WCAG 2.x are in areas where one color is extremely light or
   -1   255 extremely dark. For light colors, APCA predicts an even higher contrast
   -1   256 (difference is in the same direction as contrast polarity). For dark colors,
   -1   257 APCA predicts a lower contrast (difference is inverse to contrast polarity).
   -1   258 
   -1   259 To sum up, the APCA contrast formula is certainly not as obvious a choice as
   -1   260 the one from WCAG 2.x. I was not able to find much information on how it was
   -1   261 derived. A closer analysis reveals that it is actually not that different from
   -1   262 WCAG 2.x, but assumes much more ambient light. More research is needed to
   -1   263 determine if this higher ambient light value is significant or just an
   -1   264 artifact of the conversion I did.
  244   265 
  245   266 As we have seen, using a polarity-aware difference instead of a ratio is not a
  246   267 significant change in terms of results. However, in terms of developer