Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color scales for 7 and 9 option answers #75

Open
olehermanse opened this issue Dec 18, 2017 · 14 comments
Open

Color scales for 7 and 9 option answers #75

olehermanse opened this issue Dec 18, 2017 · 14 comments

Comments

@olehermanse
Copy link
Contributor

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
Copy link
Contributor Author

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

@olehermanse
Copy link
Contributor Author

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
Copy link
Contributor

PrebenAas commented Dec 19, 2017

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

@Berstad
Copy link
Contributor

Berstad commented Dec 19, 2017

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
Copy link
Contributor

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
Copy link
Contributor Author

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

@PrebenAas
Copy link
Contributor

@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
Copy link
Contributor Author

@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
Copy link
Contributor

@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
Copy link
Contributor Author

olehermanse commented Dec 19, 2017

@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
Copy link
Contributor

Berstad commented Dec 19, 2017

@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
Copy link
Contributor Author

@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
Copy link
Contributor

Will do asap @olehermanse

@PrebenAas
Copy link
Contributor

Added a commit: #85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants