@@ -731,12 +731,29 @@ def cubehelix(i, total, hue=1.2, start_angle=0.5):
731731
732732 session_parents = sorted (set (
733733 s .group .parent for s in sessions
734- if s .group and s .group .parent and (s .group .parent .type_id == 'area' or s .group .parent .acronym == 'irtf' )
734+ if s .group and s .group .parent and (s .group .parent .type_id == 'area' or s .group .parent .acronym in ( 'irtf' , 'iab' ) )
735735 ), key = lambda p : p .acronym )
736+
737+ liz_preferred_colors = {
738+ 'art' : { 'dark' : (204 , 121 , 167 ) , 'light' : (234 , 232 , 230 ) },
739+ 'gen' : { 'dark' : (29 , 78 , 17 ) , 'light' : (232 , 237 , 231 ) },
740+ 'iab' : { 'dark' : (255 , 165 , 0 ) , 'light' : (255 , 246 , 230 ) },
741+ 'int' : { 'dark' : (132 , 240 , 240 ) , 'light' : (232 , 240 , 241 ) },
742+ 'irtf' : { 'dark' : (154 , 119 , 230 ) , 'light' : (243 , 239 , 248 ) },
743+ 'ops' : { 'dark' : (199 , 133 , 129 ) , 'light' : (250 , 240 , 242 ) },
744+ 'rtg' : { 'dark' : (222 , 219 , 124 ) , 'light' : (247 , 247 , 233 ) },
745+ 'sec' : { 'dark' : (0 , 114 , 178 ) , 'light' : (245 , 252 , 248 ) },
746+ 'tsv' : { 'dark' : (117 ,201 ,119 ) , 'light' : (251 , 252 , 255 ) },
747+ }
736748 for i , p in enumerate (session_parents ):
737- rgb_color = cubehelix (i , len (session_parents ))
738- p .scheduling_color = "rgb({}, {}, {})" .format (* tuple (int (round (x * 255 )) for x in rgb_color ))
739- p .light_scheduling_color = "rgb({}, {}, {})" .format (* tuple (int (round ((0.9 + 0.1 * x ) * 255 )) for x in rgb_color ))
749+ if p .acronym in liz_preferred_colors :
750+ colors = liz_preferred_colors [p .acronym ]
751+ p .scheduling_color = "rgb({}, {}, {})" .format (* colors ['dark' ])
752+ p .light_scheduling_color = "rgb({}, {}, {})" .format (* colors ['light' ])
753+ else :
754+ rgb_color = cubehelix (i , len (session_parents ))
755+ p .scheduling_color = "rgb({}, {}, {})" .format (* tuple (int (round (x * 255 )) for x in rgb_color ))
756+ p .light_scheduling_color = "rgb({}, {}, {})" .format (* tuple (int (round ((0.9 + 0.1 * x ) * 255 )) for x in rgb_color ))
740757
741758 return render (request , "meeting/edit_meeting_schedule.html" , {
742759 'meeting' : meeting ,
0 commit comments