diff options
Diffstat (limited to 'stdlib/source/documentation/lux/data/color.lux')
-rw-r--r-- | stdlib/source/documentation/lux/data/color.lux | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/stdlib/source/documentation/lux/data/color.lux b/stdlib/source/documentation/lux/data/color.lux new file mode 100644 index 000000000..96a44b6ed --- /dev/null +++ b/stdlib/source/documentation/lux/data/color.lux @@ -0,0 +1,126 @@ +(.module: + [library + [lux #* + ["$" documentation (#+ documentation:)] + [control + ["<>" parser + ["<.>" code]]] + [data + ["." text (#+ \n) + ["%" format (#+ format)]]] + [macro + [syntax (#+ syntax:)] + ["." code] + ["." template]]]] + [\\library + ["." /]] + ["." / #_ + ["#." named]]) + +(documentation: /.RGB + "Red-Green-Blue color format.") + +(documentation: /.HSL + "Hue-Saturation-Lightness color format.") + +(documentation: /.CMYK + "Cyan-Magenta-Yellow-Key color format.") + +(documentation: /.HSB + "Hue-Saturation-Brightness color format.") + +(documentation: /.Color + "A color value, independent of color format.") + +(documentation: /.complement + "The opposite color." + [(complement color)]) + +(documentation: /.interpolated + "" + [(interpolated ratio end start)]) + +(template [<name>] + [(documentation: <name> + "" + [(<name> ratio color)])] + + [/.darker] + [/.brighter] + [/.saturated] + [/.un_saturated] + ) + +(syntax: (palette_documentation [[_ name] <code>.identifier]) + (in (list (code.text (format "A " (text.replaced "_" "-" name) " palette."))))) + +(documentation: /.analogous + (palette_documentation /.analogous) + [(analogous spread variations color)]) + +(documentation: /.monochromatic + (palette_documentation /.monochromatic) + [(monochromatic spread variations color)]) + +(documentation: /.Alpha + "The degree of transparency of a pigment.") + +(documentation: /.transparent + "The maximum degree of transparency.") + +(documentation: /.translucent + "The average degree of transparency.") + +(documentation: /.opaque + "The minimum degree of transparency.") + +(documentation: /.Pigment + "A color with some degree of transparency.") + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [..RGB + ..HSL + ..CMYK + ..HSB + ..Color + ..complement + ..interpolated + + ..darker + ..brighter + ..saturated + ..un_saturated + + ..analogous + ..monochromatic + ..Alpha + ..transparent + ..translucent + ..opaque + ..Pigment + ($.default /.of_rgb) + ($.default /.rgb) + ($.default /.equivalence) + ($.default /.hash) + ($.default /.black) + ($.default /.white) + ($.default /.addition) + ($.default /.subtraction) + ($.default /.hsl) + ($.default /.of_hsl) + ($.default /.hsb) + ($.default /.of_hsb) + ($.default /.cmyk) + ($.default /.of_cmyk) + ($.default /.gray_scale) + ($.default /.triad) + ($.default /.clash) + ($.default /.split_complement) + ($.default /.square) + ($.default /.tetradic) + ($.default /.Spread) + ($.default /.Palette)] + [/named.documentation])) |