Closed njoyard closed 8 years ago
it's actually also a data related issue that should appear as well in the parser at least for the Political groups colors (although it is complex as these need to remain in accordance with the classical parties colors) But at least for the steps colors (navettes and stepsbar) and the articles (deleted and added) it would be useful.
I was thinking of simply adding a colorblind mode switchable by a button somewhere, to start with (and save its state in localstorage), that remaps groups to new colors. I'm not sure about changing the colors for everyone, I'm not a designer and we have quite a nice visual identify here :)
Why not a checkbox in the menu bar indeed that would be a shared setting between amendments/discussions Need to find a short explicit name for it :)
Or an icon like http://image005.flaticon.com/1/png/256/36/36951.png
Experiment available in 462792d
Actually I was agreeing with you on the fact that colors should come from the parser (and the implementation here was just a poc) but after thinking about it I'd like to troll for a bit I'm not so sure anymore.
I agree that basic "identifying" colors should come from the api. But the way we choose to use them in the UI lies on the UI side. There's already a color transform in place (thelawfactory.utils.adjustColor) to turn the base color into something that fits the theme. Plus if we want to add more color profiles (for monochrome for example or different types of colorblindnesses... let's dream !) it doesn't make sense to grab them all from the api.
BTW, the way I implemented it does not prevent adding a new group - the new one will simply keep its "default" color even in colorblind mode, until we give it a mapped color. Or we can try to implement/reuse a real color transform algorithm (but I'm not sure it's worth the effort).
What do you think ? Side question : where do the colors come from in the first place ?
Side answer: colors are taken by the parser in the data/.cache/nosdeputes-groupes.json and similar files directly from ND/NS apis. They are maintained as conf in ND/NS code https://github.com/regardscitoyens/cpc-test/blob/nosdeputes/config/app.yml.example I feel it's best if we can try and always rely on those rather than redefining colorpalettes in every app (lending the stick to be beaten here, I don't know how many small experiments I did not following that rule ;) )
In the end I agree with you it's best for colorblindness to be handled separately as we already do some color softening from the base colors. What would be cool would be to have an automatic conversion from a palette of colors to the proper colorblind-safe equivalent palette but that sounds quite complex! (ping @jacomyma any ideas of such thing? maybe reusing iwanthue could do that?)
Maybe we should reopen this issue as the thinking might keep going btw?
Is the colorblind mode broken? I do not see any change when clicking on it.
It applies mostly to the colors of the political groups in the amendments and debates views
Is the colorblind mode broken? I do not see any change when clicking on it.
As a precaution, you might want to see a doctor.
Maybe using one of the palettes here : https://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0000HT
A wikipedia graph legible by colorblind people (all kinds ?) : https://fr.wikipedia.org/wiki/XIVe_l%C3%A9gislature_de_la_Cinqui%C3%A8me_R%C3%A9publique_fran%C3%A7aise#/media/File:Assemblee2013.png
See also this palette generator : http://tools.medialab.sciences-po.fr/iwanthue/