Meaning of colors

Started by math, December 12, 2019, 10:48:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

math

Hi!

When enabling "Settings -> Interface -> Use colors", activities in time table dialogs (e.g. Timetable -> Students -> Days horizontal) are colored. Do these colors have any meaning or are they selected randomly?

Liviu Lalescu

Hello!

The coloring code for the timetables was contributed by Marco Vassura, and I think he said it was a classical routine. The colors for the students' timetables compute the color from the subject, while for the teachers'/rooms' timetable compute the color from the subject+students' names. The color is random, but the same for the same string (same subject or same subject+students names).

The HTML timetables with level 7 are similar, I think.

math

Ah, ok, that's what I guessed.

The reason I was asking was because I would wish for a different coloring scheme. We have multiple activities for one course. Beside a lecture and an exercise, we also have tutorials, lab hours or central exercises. Hence there are multiple subjects for one course with very similar names, e.g. "Programming 1 VL" (lecture), "Programming 1 UE" (exercise), "Programming 1 LAB", etc. I would like to see that activities with similar subject names would get similar colors, so that it is clear on the first sight how the different activities of the courses are distributed over the schedule. For instance, one could use the Levenshtein distance for determining the level of similarity between two subjects.

Volker Dirr

Sadly "Programming 1 VL" and "Programming 1 UE" are different names, so the colours will be different. You might set "VL" and "UE" as a tag name, so the names will be the same.
You might also check TiTiTo. Just import the dataset and export the table again, since you can select different colours with that tool.

Volker Dirr

A second variant is that you colour yourself by the css file with html level 6.

Liviu Lalescu

Yes, unfortunately the colors are based on a 24-bit hash, so they are (or should be) very different for even small changes. Unfortunately I cannot do like you suggest. Maybe you can follow what Volker said.