Module:Color/doc

This module is used primarily by Infobox color, eliminating the need for external color converters and preventing mismatch between color coordinates.

Usage
To use this module, you may use one of the above listed templates or invoke the module directly. All functions that accept hexadecimal triplets also handle the shorthand three-digit format.

To convert a hexadecimal triplet to an RGB triplet as comma-separated values:

To convert a hexadecimal triplet to the CMYK color model without a color profile (which is a very bad idea!):

To convert a hexadecimal triplet to HSL or HSV:

To convert a hexadecimal triplet to the perceptual CIELChuv color space:

To mix two colors in the more physically correct linear RGB space:

To convert an RGB triplet to a hex code:

The following parameters are optional:
 * : defaults to  (zero)
 * : set to  (zero) to suppress percent signs in the generated output
 * : proportion of, defaults to 50
 * : minimum value of proportion range, defaults to 0
 * : maximum value of proportion range, defaults to 100