+PLAYING_MODES = (('EASY' , u'Facile'),
+ ('NORMAL' , u'Normal'),
+ ('ADVANCED', u'Avancé'),
+ ('EXPERT' , u'Expert'))
+
+
+
+PLAYING_MODES_DICT = dict([(v[0], i) for i, v in enumerate(PLAYING_MODES)])
+
+def hls_to_rgba_8bits(h, l, s, a=1) :
+ #convert to rgb ranging from 0 to 255
+ rgba = [floor(255 * i) for i in hls_to_rgb(h, l, s) + (a,)]
+ return tuple(rgba)
+