sverweij/mscgen_js

View on GitHub
src/samples/test02_some_coloring.mscin

Summary

Maintainability
Test Coverage
# test02 - some coloring options

msc {
  hscale="0.9", arcgradient="14";

  a [label="Task A", 
     textbgcolour="#cfc", 
     textcolor="#090",
     linecolor="#009"], 
  b [label="Task B", 
     textbgcolour="#fcf", 
     textcolor="#909",
     linecolor="#090"], 
  c [label="Task C", 
     textbgcolour="#ccf",
     textcolor="#009",
     linecolor="#990"],
  d [label="Classic mscgen styled entity", 
     linecolor="#fff"];

---[label="textcolour on arcs", linecolor="blue", textcolor="blue"];
  a=>>c [ label = "red", textcolour="red", linecolour="red"] ;
  a=>>c [ label = "orange", textcolour="orange", linecolour="orange"] ;
  a=>>c [ label = "yellow", textcolour="yellow", textbgcolor="black", linecolour="yellow"] ;
  a=>>c [ label = "green", textcolour="green", linecolour="green"];
  a=>>c [ label = "blue", textcolour="blue", linecolour="blue"];
  a=>>c [ label = "indigo", textcolour="indigo", 
          linecolour="indigo"];
  a:>c [ label = "violent", textcolour="violet", 
          linecolour="violet"] ;

|||;
---[label="textbgcolour on arcs", linecolor="blue", textcolor="blue"];
  a=>>c [ label = "background red", textbgcolour="red"];
  a=>>c [ label = "background orange", textbgcolour="orange"];
  a=>>c [ label = "background yellow", textbgcolour="yellow"];
  a=>>c [ label = "background green", textbgcolour="green", 
          textcolor="lime"];
  a=>>c [ label = "background blue", textbgcolour="blue",
          textcolor="cyan"];
  a=>>c [ label = "background indigo", textbgcolour="indigo",
          textcolor="violet"];
  a:>c [ label = "background violent", textbgcolour="violet"];

|||;
---[label="Colored broadcast", linecolor="blue", textcolor="blue"];
c-x*[label="Red/ yellow/ orange broadcast from Task C", textcolor="red", textbgcolor="yellow", linecolor="orange"];

a=>*[label="blue broadcast from Task A", textcolor="blue",
     textbgcolor="cyan", linecolor="darkblue"];

|||;
---[label="Color extravaganza on notes", linecolor="blue", 
    textcolor="blue"];
 a note c [label="Yellow note with red text and blue border", 
           textcolor="RED", textbgcolor="yellow", linecolor="blue"];
...;
 a box c [label="Black box with green text and red border",  
          textcolor="lime", textbgcolor="black", linecolor="red"];
...;
 a rbox c [label="White rbox with black text and border", 
           textcolor="black", textbgcolor="white", 
           linecolor="black"];
...;
 a abox c [label="Green/ lime abox", textcolor="green", 
           textbgcolor="lime", linecolor="green"];
...;
}