Other color for wrong edges
A lot of people have problems to see the color red. At the moment I replace #FF0000 with #0101FF in the graphml. Now I find the error much quicker even in a difficult diagram. Would be nice to have it configurable.
Workaround
/**
* Define the name of errorfile with Junit-Name-Rule.
*/
@Before
public void setUp() {
errorFilename = name.getMethodName() + "Error.graphml";
final Package runtimePackage = Runtime.class.getPackage();
final boolean oracleJDK = runtimePackage.getImplementationVendor().contains("Oracle");
final boolean java7 = runtimePackage.getImplementationVersion().startsWith("1.7.0");
// Oracle JDK 1.7 ends with OutOfMemory at travis-ci..
Assume.assumeFalse(oracleJDK && java7);
}
/**
* Change color from RED to BLUE.
* @throws IOException .
*/
@After
public void fixForRedBlindPeople() throws IOException {
final Path errorFile = Paths.get(errorFilename);
if (Files.exists(errorFile)) {
final Charset charset = StandardCharsets.UTF_8;
String content = new String(Files.readAllBytes(errorFile), charset);
content = content.replaceAll("#FF0000", "#0101FF");
Files.write(errorFile, content.getBytes(charset));
}
}
Thanks for the input,
I have two questions:
-
Can you recommend a color that is red for people with normal vision, but also clearly distinguishable for people that can't see the color red? Maybe a light red?
-
What do you think about a different line style instead like dashed or dotted?
About 1: You could try purple, which is easy to see for both. But you have no chance to find a solution which looks red for people with normal color-seeing and the one which are blind. Light red would be worse for both.
About 2: You could make all other lines dotted and the violations normal. I think the violations should be the eye catcher.
Generally, it would be nice that dehraph takes options to select the colours. I imagine:
- colour for the edges
- colour for edges causing a violation
- colour for java packages
- colour for each slice