Template:NFPA 704 diamond/doc

This template produces a NFPA 704 fire diamond with optionally four hazard codes. It is designed to be used in a table. Outside of a wikitable, showing is not controlled.

Primary use is through Chembox, the NFPA 704 box and OrganicBox complete (chemical data pages).

Input options
Main rule: if the quarter must be blank, input is the hyphen, -. Do not depend on default behavior in this situation.

Basic 0–4 and - (hyphen)
Parameters F, H, R accept codes. Code  (hyphen) produces a blank ("no hazard code").

A blank can be set (enforced) by entering =-, a hyphen. This is the preferred way to reflect what the source states (don't depend on the default blank in this situation).

Default code (blank)
All four codes default to blank, that is: no NFPA code is present or shown. There is no specific text (just a link to the NFPA color section). Note that a blank is not the same as code "0". Code "0" is an explicit statement, while a blank is the absence of any statement.

A blank can also be enforced by entering =- (hyphen). This is the preferred way to reflect what the source states (do not depend on default).

From the input, spaces and even newlines (all whitespace) are treated as blank. Note that  code produces an error, but entering the nbsp character (>= <) is accepted as a space (blank).

Special hazard options
For  enter W.

For  enter W+OX, W OX or WOX.

The "Special" quarter is sometimes called "Other".

Unknown codes (error)
The diamond template checks for unknown codes.

Articles with unknown codes are listed for maintenance (correction) in Category:Articles with unknown NFPA 704 code. Other pages (like this documentation) are not categorized, but have a message instead. This categorizing can be switched off by setting no

Note that  code produces an error, but entering the nbsp character (= ) is accepted as a space (blank).

Adding references
References can be added using ref.



The &lt;ref> ... &lt;/ref> tags should be added. Multiple references can be entered. Depending on cell width, the links show above or next to the diamond. While technically possible to enter plain text, this is not supported (and this could be disallowed in the future).

Code description
These are the title texts (mousehover texts), shown for a code used in the diamond. They are plain text; not links or styles can be entered.

Color style

 * Option background. Default is transparent.


 * Colors used

Better not to use RGB colors named, because these produce a bad contrast with the text.

Demo references
The references are from the demos.