Skip to content
Snippets Groups Projects
Commit 15cb25be authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '163-fixed-color-coding-in-the-daily-planning' into 'master'

fixed color coding

Closes #163

See merge request !80
parents c2c2c743 c9a24681
No related branches found
No related tags found
1 merge request!80fixed color coding
Pipeline #
import datetime
import json
import random
from operator import itemgetter
from django.contrib.auth.decorators import login_required
......@@ -11,16 +9,27 @@ from django.shortcuts import get_object_or_404
from ..models import Appointment, AppointmentTypeLink, Worker, Availability, Holiday
from ..views.notifications import get_filter_locations
# mix_color = (0, 166, 90)
mix_color = (155, 155, 155)
def get_random_color():
r = lambda: random.randint(0, 255)
return '#%02X%02X%02X' % ((r() + mix_color[0]) / 2, (r() + mix_color[1]) / 2, (r() + mix_color[2]) / 2)
RANDOM_COLORS = [get_random_color() for i in range(20)]
RANDOM_COLORS = [
'#%02X%02X%02X' % (8, 218, 217),
'#%02X%02X%02X' % (8, 8, 101),
'#%02X%02X%02X' % (8, 218, 3),
'#%02X%02X%02X' % (247, 137, 156),
'#%02X%02X%02X' % (183, 96, 2),
'#%02X%02X%02X' % (20, 106, 55),
'#%02X%02X%02X' % (8, 119, 217),
'#%02X%02X%02X' % (16, 76, 27),
'#%02X%02X%02X' % (85, 7, 162),
'#%02X%02X%02X' % (157, 7, 2),
'#%02X%02X%02X' % (49, 65, 68),
'#%02X%02X%02X' % (112, 124, 98),
'#%02X%02X%02X' % (8, 8, 215),
'#%02X%02X%02X' % (85, 7, 98),
'#%02X%02X%02X' % (16, 76, 100),
'#%02X%02X%02X' % (85, 7, 50),
'#%02X%02X%02X' % (183, 5, 2),
'#%02X%02X%02X' % (183, 156, 2),
'#%02X%02X%02X' % (112, 82, 38),
]
def build_duration(duration):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment