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

tell blue from green in pair diagrams #202

Closed
jo-pol opened this issue Oct 16, 2021 · 6 comments
Closed

tell blue from green in pair diagrams #202

jo-pol opened this issue Oct 16, 2021 · 6 comments
Labels
scala-js This implies installing sbt and executing one of the toJS scripts. http://www.scala-js.org/

Comments

@jo-pol
Copy link
Collaborator

jo-pol commented Oct 16, 2021

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

jo-pol commented Oct 16, 2021

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)

val colors: Map[String, String] = Map(
"" -> "#000",
"red" -> "#f00",
"blue" -> "#18C",
"green" -> "#080",
"brown" -> "#c90",
"purple" -> "#c3f",
"yellow" -> "#ee0",
"turquoise" -> "#0f9")

private val availableColors = Set("red", "green", "purple", "blue", "brown", "turquoise")

| ${startMarker("red")}
| ${startMarker("blue")}
| ${startMarker("green")}
| ${startMarker("brown")}
| ${startMarker("purple")}
| ${startMarker("yellow")}
| ${startMarker("turquoise")}
| ${endMarker("red")}
| ${endMarker("blue")}
| ${endMarker("green")}
| ${endMarker("brown")}
| ${endMarker("purple")}
| ${endMarker("yellow")}
| ${endMarker("turquoise")}

case (key,value) => s"; marker-$key: url('#$key-$value')"

@jo-pol
Copy link
Collaborator Author

jo-pol commented Oct 16, 2021

Test sample

@jo-pol jo-pol added the scala-js This implies installing sbt and executing one of the toJS scripts. http://www.scala-js.org/ label Oct 16, 2021
@jo-pol
Copy link
Collaborator Author

jo-pol commented Oct 16, 2021

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

jo-pol commented Oct 17, 2021

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

@jo-pol
Copy link
Collaborator Author

jo-pol commented Oct 24, 2021

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']

"" -> "purple", // default is ctc
"t" -> "",
"ct" -> "green",
"tc" -> "green",
"tct" -> "green",
"ctc" -> "purple",
"ctct" -> "red",
"tctc" -> "red",
"tctct" -> "red",
"ttctc" -> "red",
"ctctt" -> "red",
"cttc" -> "turquoise",
"tcttc" -> "turquoise",
"cttct" -> "turquoise",
"cltc" -> "brown",
"crtc" -> "brown",
"crrc" -> "brown",
"clllc" -> "brown",
"ctttc" -> "brown",
"ctctc" -> "blue",
"ctctct" -> "blue",
"tctctc" -> "blue",
"ctctctc" -> "blue",
"cllcrrcllc" -> "yellow",
"crrcllcrrc" -> "yellow",
"cllcrrcllcrrc" -> "yellow",
"crrcllcrrcllc" -> "yellow",

@jo-pol jo-pol mentioned this issue Oct 24, 2021
5 tasks
@jo-pol
Copy link
Collaborator Author

jo-pol commented Apr 9, 2023

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.

@jo-pol jo-pol closed this as completed Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scala-js This implies installing sbt and executing one of the toJS scripts. http://www.scala-js.org/
Projects
None yet
Development

No branches or pull requests

1 participant