all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Colour blindness correction (was: Colour manipulation)
Date: Tue, 23 Nov 2010 19:32:31 +0100	[thread overview]
Message-ID: <87sjyrhow0.fsf_-_@keller.adm.naquadah.org> (raw)
In-Reply-To: <87eiac9fsz.fsf@lifelogs.com> (Ted Zlatanov's message of "Tue, 23 Nov 2010 10:15:56 -0600")

On Tue, Nov 23 2010, Ted Zlatanov wrote:

> On Tue, 23 Nov 2010 16:54:34 +0100 Julien Danjou <julien@danjou.info> wrote: 
>
> JD> On Tue, Nov 23 2010, Ted Zlatanov wrote:
>>> I would recommend to let users customize a color vision profile as part
>>> of color-lab (see my original long explanation of my work with colors in
>>> GUI design).  Maybe just a list of colors and their contrasting pairs
>>> (with a reasonable set of defaults for each of the various kinds of
>>> colorblindness), from which we can approximate what will look good
>>> anywhere in the colorspace, will be sufficient.  The algorithms are nice
>>> to have but not essential to the original requirement.
>
> JD> That sounds like an option indeed. I'll probably use that if I can't do
> JD> something better.
>
> JD> Now, what I have in mind…
>
> JD> I think the only colour blindness types we should consider are all forms
> JD> of dichromacy. In that case, since we use RGB (hehe), dropping one of
> JD> the 3 components (depending of the dichromacy type) and using the same
> JD> computing could work.
>
> JD> If I simulate protanopia with the following code and then correct it,
> JD> this is what I got:
> JD>  (let* ((fg "#ffaabb")
> JD>         (bg "#aaffbb")
> JD>         (fg-cb (mapcar (lambda (x) (/ x 256)) (x-color-values fg)))
> JD>         (bg-cb (mapcar (lambda (x) (/ x 256)) (x-color-values bg))))
> JD>    (shr-color-check
> JD>     ;; No red color blindness
> JD>     (apply 'format "#00%02X%02X" (cdr fg-cb))
> JD>     (apply 'format "#00%02X%02X" (cdr bg-cb))))
>
> JD> ==> ("#3effce" "#0096a6")
>
> JD> I simulate it by setting red to 0, and let the code correct the color.
> JD> It generates 2 new colors: #3effce #0096a6, which are 2 different blues.
> JD> Even #3effce without the red component (#00ffce) seems visible.
>
> JD> If I use 2 different reds like #ff0000 and #bb0000 it generates black
> JD> and grey: #000000 and #5e5e5e. The grey is probably viewed as #005e5e
> JD> which is some green-blue, and should be visible.
>
> JD> This is probably not perfect, but is this good enough? Any color blind
> JD> people in there? :)
>
> You can test at http://colorschemedesigner.com/
>
> The colors you mentioned looked OK to me and yes, killing the red is
> probably a good way to fix it for most people (maybe it's as simple as a
> custom set of RGB adjustment constants for general use?).  You may want
> to take the discussion to emacs-devel to find both more opinions and
> more testers.  There may be someone that knows about existing similar
> work for Emacs Lisp; I already searched but didn't find any.

Good idea. I'm following up to emacs-devel as well, so maybe there some
people willing to help.

Having at least a function to simulate blindness like on
http://colorschemedesigner.com/ would be helpful to enhance
shr-color-check.

-- 
Julien Danjou
// ᐰ <julien@danjou.info>   http://julien.danjou.info



           reply	other threads:[~2010-11-23 18:32 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <87eiac9fsz.fsf@lifelogs.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sjyrhow0.fsf_-_@keller.adm.naquadah.org \
    --to=julien@danjou.info \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.