Hacker News new | ask | show | jobs
by jart 1555 days ago
Here's a link to where you can see screenshots of his themes: https://www.w3.org/WAI/WCAG2AAA-Conformance The code is stored at https://github.com/protesilaos/modus-themes For example:

    (defun modus-themes-wcag-formula (hex)
      "Get WCAG value of color value HEX.
    The value is defined in hexadecimal RGB notation, such as those in
    `modus-themes-operandi-colors' and `modus-themes-vivendi-colors'."
      (cl-loop for k in '(0.2126 0.7152 0.0722)
               for x in (color-name-to-rgb hex)
               sum (* k (if (<= x 0.03928)
                            (/ x 12.92)
                          (expt (/ (+ x 0.055) 1.055) 2.4)))))
Sounds like a prize well deserved! Stuff like this has traditionally been a blind spot in Free software. Glad to hear we're getting a more beautiful and accessible Emacs.
1 comments