[Python-ideas] Coloured documentation

Talin talin at acm.org
Thu May 7 08:28:24 CEST 2009


I've found through experimentation that Georg's default CSS color scheme 
looks pretty good when you apply a hue rotation. (I.e. convert to HSB, 
add a delta to H, then convert back to RGB.) In fact, if you are using 
Sphinx and you want something that looks (a) pretty, and (b) different 
than the default, but you don't want to spend a lot of time tweaking all 
of the colors, a global hue rotation is the easiest way to go.

The net result is that light colors stay light, dark colors dark, and 
complementary colors stay complementary, and the whole thing stays readable.

A 30 degree rotation for each release would allow for adjacent releases 
to be visually distinct, and would allow for 12 releases before the 
color scheme repeats.

If more schemes are needed, you can generate additional permutations by 
swapping color components.

-- Talin

Jeremy Banks wrote:
> I'm +1 if it could be implemented without much hassle.
> 
> Perhaps the bikeshedding could be minimized by deciding in advance on
> how the colors would be calculated.
> 
> Something like...
>    R = (MAJOR + MINOR / 16) / 5
>    G = 1 - ((MAJOR + MINOR / 16) / 5)
>    B = REVISION / 16
> 
> So the change would be more dramatic between larger changes.
> 
> On 2009-05-06, Konrad Delong <konryd at gmail.com> wrote:
>> The documentation under http://docs.python.org/ could have different
>> colour schemes for Python 2.5, 2.6, 2.7, 3.0, 3.1 and so on. This way
>> one would know on sight which docs one's reading.
>> It would also cause a lot of bikeshed talk for every release :)
>>
>> Konrad
>> _______________________________________________
>> Python-ideas mailing list
>> Python-ideas at python.org
>> http://mail.python.org/mailman/listinfo/python-ideas
>>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
> 



More information about the Python-ideas mailing list