Trees | Indices | Help |
---|
|
1 # callirhoe - high quality calendar rendering 2 # Copyright (C) 2012 George M. Tzoumas 3 4 # This program is free software: you can redistribute it and/or modify 5 # it under the terms of the GNU General Public License as published by 6 # the Free Software Foundation, either version 3 of the License, or 7 # (at your option) any later version. 8 # 9 # This program is distributed in the hope that it will be useful, 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # GNU General Public License for more details. 13 # 14 # You should have received a copy of the GNU General Public License 15 # along with this program. If not, see http://www.gnu.org/licenses/ 16 17 # --- style.rainbow_gfs --- 18 19 """module defining rainbow color & gfs style""" 20 21 import gfs 22 23 # day of week 25 26 # day of month 28 30 32 34 36 38 39 from lib.geom import color_mix, color_scale, color_auto_fg 4042 winter = (0,0.5,1) 43 spring = (0.0,0.7,0.0) 44 summer = (1,0.3,0) 45 autumn = (0.9,0.9,0) 46 _c1 = ((0,0,0), winter, 47 color_mix(winter,spring,0.66), color_mix(winter,spring,0.33), spring, # april 48 color_mix(spring,summer,0.66), color_mix(spring,summer,0.33), summer, # july 49 color_mix(summer,autumn,0.66), color_mix(summer,autumn,0.33), autumn, # october 50 color_mix(autumn,winter,0.66), color_mix(autumn,winter,0.33)) # december 51 color_map_bg = (map(lambda x: color_scale(x, 0.5), _c1), _c1) 52 color_map_fg = (((1,1,1),)*13, ((0,0,0),)*13)53 # map(lambda x: color_auto_fg(x), color_map_bg[1] 54
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun Nov 30 23:24:15 2014 | http://epydoc.sourceforge.net |