Nitrogen Fingers Paint

Nitrogen Fingers Paint (NFP) is a simple text file format used by ComputerCraft to store images.

CraftOS's  program allows for easy editing of these files with a GUI.

Format
An NFP file consists of a text file containing a hex character for each pixel.

Each pixel's character must be in the range  and be lowercase, any other characters (including capital  ) are treated as fully transparent pixels.

The newline character moves to the beginning of the next row. Due to the nature of this, it is possible to have rows of different length and therefore means that nonsquare images can be created.

Whilst any unrecognised character is treated as a transparent pixel, it is recommended that a space be used. CraftOS's  program automatically converts all transparent pixels to a space when saved.

Colours
To calculate a colour for a given value do  and then treat it as a 24-bit RGB value (8 bits for each of red, green and blue).

It is recommended that a lookup table be generated for performance.

Pixel aspect ratio
CraftOS's  library (and therefore  ) uses character mode for displaying images, meaning one image "pixel" is a character cell. Character cells are at a 2:3 aspect ratio, 12×18 real pixels in size.

Example
{| ! NFP !! PNG !! PNG (nonsquare) '' is used when generating the lookup table.
 * +[[File:NFP_transparent.png]] represents a transparent pixel.
 * +[[File:NFP_transparent.png]] represents a transparent pixel.
 * ComputerCraft:Tweaked Wiki's Colour table (Paint/Blit column)
 * CraftOS-Standards (Poorly documented)