-
Notifications
You must be signed in to change notification settings - Fork 1
Syntax
Alan edited this page Jul 6, 2019
·
5 revisions
<diagram>
This is a diagram
</diagram>
<diagram>
This is a [#f00]diagram
</diagram>
(the word "diagram" is displayed in red)
<diagram>
This is a [@f00]diagram
</diagram>
(the word "diagram" is highlighted in red)
<diagram fg="#0f0">
This is a diagram
</diagram>
(the entire diagram is displayed in green)
<diagram bg="#0f0">
This is a diagram
</diagram>
(the entire diagram's background is green)
The foreground color defaults to 7:0
, or #c0c0c0
. The background color defaults to 0:0
, or #000000
.
-
[#]
resets the foreground color to the default (specified in the<diagram>
tag's attributes; falls back to default otherwise). -
[@]
resets the background color. -
[@#]
and[@#]
reset both.
The 16 DF colors are automatically translated into HTML colors (in the form 0-7:0-1
). The colors are listed here, taken from Color.php:
// Standard DF colors
$DFCOLORS = array(
'0:0' => '#000000',
'0:1' => '#505050',
'1:0' => '#000080',
'1:1' => '#0000ff',
'2:0' => '#c0c0c0',
'2:1' => '#00ff00',
'3:0' => '#008080',
'3:1' => '#00ffff',
'4:0' => '#800000',
'4:1' => '#ff0000',
'5:0' => '#800080',
'5:1' => '#ff00ff',
'6:0' => '#808000',
'6:1' => '#ffff00',
'7:0' => '#c0c0c0',
'7:1' => '#ffffff'
);