FET Forum

FET Support (English) => Get Help => Topic started by: math on December 12, 2019, 10:48:47 AM

Title: Meaning of colors
Post by: math on December 12, 2019, 10:48:47 AM
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?
Title: Re: Meaning of colors
Post by: Liviu Lalescu on December 12, 2019, 11:14:10 AM
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.
Title: Re: Meaning of colors
Post by: math on December 12, 2019, 09:49:52 PM
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.
Title: Re: Meaning of colors
Post by: Volker Dirr on December 12, 2019, 10:26:53 PM
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.
Title: Re: Meaning of colors
Post by: Volker Dirr on December 12, 2019, 10:39:19 PM
A second variant is that you colour yourself by the css file with html level 6.
Title: Re: Meaning of colors
Post by: Liviu Lalescu on December 13, 2019, 06:41:52 AM
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.