fui / fui-kk

Course evaluation software for courses in informatics at the University of Oslo.
MIT License
8 stars 7 forks source link

Color scales for 7 and 9 option answers #75

Open olehermanse opened 6 years ago

olehermanse commented 6 years ago

Can someone make a scale of colors (hex) from green (good) to red (bad) with 7 and 9 points, for our new questions?

I added some temporary ones in #74 :

    # TODO: Define 7 and 9 color scale
    if len(answers) == 9:
        colors = "['#00ff00', '#44ff00', '#88ff00', '#ccff00', '#ffff00', '#ffcc00', '#ff8800', '#ff4400', '#ff0000']"
    elif len(answers) == 7:
        colors = "['#00ff00', '#66ff00', '#ccff00', '#ffff00', '#ffcc00', '#ff6600', '#ff0000']"
    elif len(answers) == 6:
        colors = "['#1a9850', '#91cf60', '#d9ef8b', '#fee08b', '#fc8d59', '#d73027']"
    elif len(answers) == 5:
        colors = "['#d7191c', '#fdae61', '#91cf60', '#abd9e9', '#2c7bb6']"
    else:
        print("Warning: Chart for '{}' omitted. No colors defined for questions with {} alternatives".format(
            question, len(answers)))
        return ''
olehermanse commented 6 years ago

@PrebenAas @evestera Can one of you take a look at this?

olehermanse commented 6 years ago

For reference, this shows our current 6 point scale colors: https://www.mn.uio.no/ifi/livet-rundt-studiene/organisasjoner/fui/kursevaluering/H2016/INF1000.html

PrebenAas commented 6 years ago

Something like this, @olehermanse ? Will convert to code if accepted. Color Scale Suggestions.pdf

Berstad commented 6 years ago

We should perhaps consider a different scale than green to red (or adjust the charts in some other way), given how common red-green colorblindness is.

PrebenAas commented 6 years ago

Yes, I was thinking about something like that as well. I justified it this time that we have explanation on all boxes/individual scale elements. I think, however, it is the best if we could adjust the colors to improve the readability in regards of colorblindness.

olehermanse commented 6 years ago

@PrebenAas Why do you have 8 colors in the 9 point scale?

PrebenAas commented 6 years ago

@olehermanse sorry, mistake! I suggest a color palette similar to this then, going from dark to bright colors: http://mkweb.bcgsc.ca/colorblind/img/colorblindness.palettes.simple.png

olehermanse commented 6 years ago

@Berstad @PrebenAas wrt color blindness, a higher contrast scale would be better, i.e. have it go brighter green -> medium yellow -> darker red, or darker green -> brighter yellow -> darker red. The biggest problem I see is the orange-y yellowy shades in the middle.

PrebenAas commented 6 years ago

@olehermanse I don't think the colors green and red are good at all if we were to fully facilitate for color blindness. Some people cannot separate green from red at all.

olehermanse commented 6 years ago

@PrebenAas But they can separate bright from dark. Unless someone implements a color blind mode button, I don't think it makes sense to optimize for severe color blindness, by adopting a scale where each color is seemingly random, like the one you linked.

Edit: Blue to red, or blue to orange is another option

Berstad commented 6 years ago

@PrebenAas @olehermanse It seems like a blue to red color scale could be a good compromise, something like this: https://stablekernel.com/wp-content/uploads/2017/04/basicGradient-054950-edited-1030x360.png It seems like that would sort-of cover most forms of color-blindness (the other forms seem to be extremely rare.) I also found this which is probably better: https://github.com/nesanders/colorblind-colormap. A color blind mode might be a good idea for the future.

olehermanse commented 6 years ago

@PrebenAas Can you make an executive decision and provide hex colors for at least 7 and 9 scales? Optionally redo the old ones as well (5 and 6)

PrebenAas commented 6 years ago

Will do asap @olehermanse

PrebenAas commented 6 years ago

Added a commit: #85