d-bl / GroundForge

Bobbin Lace Diagrams : threads from pairs
https://d-bl.github.io/GroundForge/
GNU General Public License v3.0
12 stars 7 forks source link

tell blue from green in pair diagrams #202

Closed jo-pol closed 1 year ago

jo-pol commented 3 years ago

Very hard for people to tell blue from green in pair diagrams. 4th bullet of https://groups.io/g/GroundForge/message/364, see also note on color blinds in #197

jo-pol commented 3 years ago

Related code below. It looks like it only needs a change of the hexadecimal values in the first cited code section and compile it with one of the toJS scripts.

Side note: The code would more stable if availableColors was assigned from colors.keys.filterNot(_.isEmpty)

https://github.com/d-bl/GroundForge/blob/8be8df1f6c2408e2f4570742a58c430d521e6431/src/main/scala/dibl/Stitches.scala#L149-L157 https://github.com/d-bl/GroundForge/blob/8be8df1f6c2408e2f4570742a58c430d521e6431/src/main/scala/dibl/Stitches.scala#L113 https://github.com/d-bl/GroundForge/blob/3a3d93b54638ef71931095f65d346ae8d1223272/src/main/scala/dibl/DiagramSvg.scala#L101-L114 https://github.com/d-bl/GroundForge/blob/3a3d93b54638ef71931095f65d346ae8d1223272/src/main/scala/dibl/DiagramSvg.scala#L153

jo-pol commented 3 years ago

Test sample

jo-pol commented 3 years ago

You can play with the inspector of a browser to figure out a pallet. A screenshot from FireFox shows how to change the stroke colors: image

jo-pol commented 3 years ago

See also the proposed incomplete set of colors: https://github.com/d-bl/GroundForge#colors

jo-pol commented 3 years ago

A generated color scheme has a mismatch between turquoise and orange. According to the generator it is not color blind safe either. Looking at the diagrams meant for captions in #205 it is still hard to tell blue from green. Any opinions/suggestions?

image From https://colorbrewer2.org/#type=qualitative&scheme=Set1&n=7 ['#e41a1c','#377eb8','#4daf4a','#984ea3','#ff7f00','#ffff33','#a65628']

https://github.com/d-bl/GroundForge/blob/da16538678d9eb8e4326de228be5adbd6a100949/src/test/scala/dibl/StitchesSpec.scala#L28-L54

jo-pol commented 1 year ago

Obsolete due to the new 4-color per stitch approach. Except for the droste pair diagrams, but these are only kept alive on an as-is basis.