Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: [gnus git]  branch master updated: =1= shr.el (shr-tag-div): Added.
Date: Wed, 10 Nov 2010 07:14:32 -0600	[thread overview]
Message-ID: <878w11pbgn.fsf@lifelogs.com> (raw)
In-Reply-To: <m3lj52w1vs.fsf@quimbies.gnus.org>

On Tue, 09 Nov 2010 23:47:19 +0100 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> There's also external and inline stylesheets.  Let's say I parse those
>> out and get the inheritance right, can you go from there?

LMI> I'm not sure it's worth it...  reading Gwene feeds with Gnus is more
LMI> pleasant that reading them via a web browser, and part of that is that
LMI> it's plainer text.  Most of the CSS things are just visual noise.  :-)

OK, you're probably right since no one else has asked for CSS parsing.
So I'll drop this unless there's demand.

On Wed, 10 Nov 2010 10:54:06 +0100 Julien Danjou <julien@danjou.info> wrote: 

JD> On Tue, Nov 09 2010, Lars Magne Ingebrigtsen wrote:

>> So I wonder whether it's easy to write a function (or whether someone
>> already has written) that would take two colours -- in this instance,
>> "blue" (say #0000ff) and black, and transform the blue into a colour
>> "light enough" to be read on a black background.  (And the opposite with
>> a white background, of course.)

JD> In rainbow-mode[1], I use luminance computing to determine if the
JD> background is light or dark.

JD> (defun rainbow-color-luminance (red green blue)
JD>    "Calculate the luminance of color composed of RED, BLUE and GREEN."
JD>    (floor (+ (* .2126 red) (* .7152 green) (* .0722 blue)) 256))

JD> If it's > 128, you can assume the color is dark.

JD> I'm pretty sure there's a easy way to light or dark a color using its
JD> HSV representation and increasing/decreasing it's saturation and value.

JD> I can dig a bit and come up with some code if you want. :)

JD> [1]  http://julien.danjou.info/rainbow-mode.html

I know the Sanselan Java library has lots of good code to manipulate
colors.  You may find it useful as a reference point.

<aside>
Well, there's a lot of research done on this in the context of painting
and photography, but also UI research.  I had to look into it for some
GUI work just last year; there are several approaches depending on how
you balance the need for the colors to look good together, contrast
well, and reveal fine detail.  The eye has very nonlinear sensitivity
(each of the three types of cone cells has its own response curve) so
you need to consult data tables and a simple HSV, RGB, etc. model as you
suggest will not work.  But even then things depend on the ambient
light!  And color-blind people, who usually just see color differently,
are surprisingly common.

My solution (in our codebase) was to find good colors manually.  I was
not happy with any of the existing solutions.  So in my solution each
color gets two data points: one for good contrast and one for good
harmony (e.g. for constructing gradients).

I did this for many points in the color space and then could approximate
any requested color.  When an approximation was wrong I added another
data point.  Finally, I allowed people to customize the data table.
</aside>

Ted




  parent reply	other threads:[~2010-11-10 13:14 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1PArgx-0006dS-00@quimby.gnus.org>
2010-10-26 23:58 ` Lars Magne Ingebrigtsen
2010-10-27  0:15   ` Katsumi Yamaoka
2010-10-27  0:22     ` Katsumi Yamaoka
2010-10-27  0:28     ` Lars Magne Ingebrigtsen
2010-10-27  0:43       ` Katsumi Yamaoka
2010-10-27 18:06   ` Ted Zlatanov
2010-10-29 23:18     ` Lars Magne Ingebrigtsen
2010-11-09 22:25       ` Ted Zlatanov
2010-11-09 22:47         ` Lars Magne Ingebrigtsen
2010-11-09 23:02           ` Steinar Bang
2010-11-10  9:54           ` Julien Danjou
2010-11-10 17:49             ` Colourspace (was: [gnus git] branch master updated: =1= shr.el (shr-tag-div): Added.) Lars Magne Ingebrigtsen
2010-11-10 19:09               ` Colourspace Julien Danjou
2010-11-10 19:44                 ` Colourspace Ted Zlatanov
2010-11-10 19:56                   ` Colourspace Julien Danjou
2010-11-10 20:22                     ` ELPA and Gnus (was: Colourspace) Ted Zlatanov
2010-11-10 20:48                       ` ELPA and Gnus Lars Magne Ingebrigtsen
2010-11-10 21:23                         ` Ted Zlatanov
2010-11-10 21:32                           ` Lars Magne Ingebrigtsen
2010-11-11 13:19                             ` Ted Zlatanov
2010-11-14 16:07                               ` Lars Magne Ingebrigtsen
2010-11-15 15:43                               ` Julien Danjou
2010-11-11  9:06                         ` Julien Danjou
2010-11-14 16:07                           ` Lars Magne Ingebrigtsen
2010-11-10 20:48                 ` Colourspace Lars Magne Ingebrigtsen
2010-11-10 20:55                   ` Colourspace Lars Magne Ingebrigtsen
2010-11-11  8:59                     ` Colourspace Julien Danjou
2010-11-18 18:49               ` Colourspace Ted Zlatanov
2010-11-10 13:14           ` Ted Zlatanov [this message]
2010-11-19 16:13           ` [gnus git] branch master updated: =1= shr.el (shr-tag-div): Added Julien Danjou
2010-11-21  4:40             ` Lars Magne Ingebrigtsen
2010-11-21 13:55               ` Julien Danjou
2010-11-21 18:38                 ` Colour manipulation (was: [gnus git] branch master updated: =1= shr.el (shr-tag-div): Added.) Lars Magne Ingebrigtsen
2010-11-21 18:55                   ` Colour manipulation Julien Danjou
2010-11-21 19:02                     ` Lars Magne Ingebrigtsen
2010-11-21 19:26                       ` Julien Danjou
2010-11-21 19:42                         ` Lars Magne Ingebrigtsen
2010-11-22 14:49                         ` Julien Danjou
2010-11-24  2:27                           ` Katsumi Yamaoka
2010-11-24  5:45                             ` Katsumi Yamaoka
2010-11-24  6:39                               ` Lars Magne Ingebrigtsen
2010-11-24  8:43                                 ` Julien Danjou
2010-11-24 20:37                                   ` Lars Magne Ingebrigtsen
2010-11-24 20:48                                     ` Lars Magne Ingebrigtsen
2010-11-24 21:18                                     ` Julien Danjou
2010-11-24 21:27                                       ` Lars Magne Ingebrigtsen
2010-11-24  8:52                               ` Julien Danjou
2010-11-24  6:39                             ` Lars Magne Ingebrigtsen
2010-11-24  8:37                             ` Julien Danjou
2010-11-22 15:37                         ` Julien Danjou
2010-11-22 15:59                           ` Lars Magne Ingebrigtsen
2010-11-23  1:38                             ` Lars Magne Ingebrigtsen
2010-11-23  9:15                               ` Julien Danjou
2010-11-23 23:50                                 ` Lars Magne Ingebrigtsen
2010-11-23  9:48                               ` Julien Danjou
2010-11-23 23:52                                 ` Lars Magne Ingebrigtsen
2010-11-21 19:57                     ` Frank Schmitt
2010-11-22 19:47                     ` Ted Zlatanov
2010-11-23  9:10                       ` Julien Danjou
2010-11-23 14:52                         ` Ted Zlatanov
2010-11-23 15:54                           ` Julien Danjou
2010-11-23 16:15                             ` Ted Zlatanov
2010-11-23 18:32                               ` Colour blindness correction (was: Colour manipulation) Julien Danjou
2010-11-23 23:50                             ` Colour manipulation Lars Magne Ingebrigtsen
2010-11-24  8:32                               ` Julien Danjou
2010-11-26 20:17                             ` Adam Sjøgren
2010-11-24  1:09                         ` Greg Troxel

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=878w11pbgn.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).