monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: New release of monotone-viz


From: Olivier Andrieu
Subject: Re: [Monotone-devel] Re: New release of monotone-viz
Date: Sat, 11 Dec 2004 18:10:09 +0100 (CET)

 > Asger Ottar Alstrup [Sat, 11 Dec 2004]:
 > Christof Petig wrote:
 > > PS: Considering auto colorizing: What about hashing branch and/or
 > > author with sha1 and take the first three bytes as R,G and
 > > B. Most likely you have to switch the _text_ color to white once
 > > e.g. max(R,G,B)<128 or R+G+B<255. This might be a bit psychedelic
 > > but should give distinct enough and stable enough colors.
 > 
 > Since the RGB color space is not tuned to match the human eye, you
 > will get much better results using this formula:
 > 
 > int luminance = 0.3 * red + 0.59 * green + 0.11 * blue;
 > if (luminance  < 128) {
 >    // Choose white
 > }  else {
 >    // Choose black
 > }

Yeah, I tried picking colors in HLS space (Hue, Lightness, Saturation)
based on a hash. It gives adequate colors but with a dozen keys you're
quite likely to get two colors with a similar hue, so I'd like to try
something less "random".

-- 
   Olivier




reply via email to

[Prev in Thread] Current Thread [Next in Thread]