Wgraph:Demo color

From FollowTheScore
Jump to: navigation, search
  • There is a set of common pre-defined color names
  • You can use #rrggbb to define your own colors
  • Custom colors are internally mapped to a table of color_entries (which has a maximum of ~220 free slots)
  • in the GDL code you see that custom colors start index 32

{{#wgraph:svg|thumb=90|wgl|gdl|

 x_factor 100 y_factor 30
 node  0 { label white           textcolor black   color white         x 0  y 0 }
 node  1 { label blue            textcolor black   color blue          x 1  y 0 }
 node  2 { label red             textcolor black   color red           x 2  y 0 }
 node  3 { label green           textcolor black   color green         x 3  y 0 }
 node  4 { label yellow          textcolor black   color yellow        x 0  y 1 }
 node  5 { label magenta         textcolor black   color magenta       x 1  y 1 }
 node  6 { label cyan            textcolor black   color cyan          x 2  y 1 }
 node  7 { label darkgray        textcolor white   color darkgray      x 3  y 1 }
 node  8 { label darkblue        textcolor white   color darkblue      x 0  y 2 }
 node  9 { label darkred         textcolor white   color darkred       x 1  y 2 }
 node 10 { label darkgreen       textcolor white   color darkgreen     x 2  y 2 }
 node 11 { label darkyellow      textcolor white   color darkyellow    x 3  y 2 }
 node 12 { label darkmagenta     textcolor white   color darkmagenta   x 0  y 3 }
 node 13 { label darkcyan        textcolor white   color darkcyan      x 1  y 3 }
 node 14 { label gold            textcolor black   color gold          x 2  y 3 }
 node 15 { label lightgray       textcolor black   color lightgray     x 3  y 3 }
 node 16 { label lightblue       textcolor black   color lightblue     x 0  y 4 }
 node 17 { label lightred        textcolor black   color lightred      x 1  y 4 }
 node 18 { label lightgreen      textcolor black   color lightgreen    x 2  y 4 }
 node 19 { label lightyellow     textcolor black   color lightyellow   x 3  y 4 }
 node 20 { label lightmagenta    textcolor black   color lightmagenta  x 0  y 5 }
 node 21 { label lightcyan       textcolor black   color lightcyan     x 1  y 5 }
 node 22 { label lilac           textcolor black   color lilac         x 2  y 5 }
 node 23 { label turquiose       textcolor black   color turquoise     x 3  y 5 }
 node 24 { label aquamarine      textcolor black   color aquamarine    x 0  y 6 }
 node 25 { label khaki           textcolor black   color khaki         x 1  y 6 }
 node 26 { label purple          textcolor black   color purple        x 2  y 6 }
 node 27 { label yellowgreen     textcolor black   color yellowgreen   x 3  y 6 }
 node 28 { label pink            textcolor black   color pink          x 0  y 7 }
 node 29 { label orange          textcolor black   color orange        x 1  y 7 }
 node 30 { label orchid          textcolor black   color orchid        x 2  y 7 }
 node 31 { label black           textcolor white   color black         x 3  y 7 }
 node 32 { label #ffcc77         textcolor red     color #ffcc77       x 0  y 8 }
 node 33 { label #ddffdd         textcolor red     color #ddffdd       x 1  y 8 }
 node 34 { label #ddddff         textcolor red     color #ddddff       x 2  y 8 }
 node 35 { label #aaccff         textcolor red     color #aaccff       x 3  y 8 }
 nodetype * { border_color black width 1 height 1}

}}