aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/data
diff options
context:
space:
mode:
authorEduardo Julian2023-01-06 12:55:42 -0400
committerEduardo Julian2023-01-06 12:55:42 -0400
commit06f5b1c544ad27eecfbc7cc9b3bd7591f9e33423 (patch)
tree06d2d9092a220422fd644f7f205264df8a53347c /stdlib/source/documentation/lux/data
parentab1829d77c7d12af344af68d6c50d391f1126640 (diff)
Now documenting exported aliases.
Diffstat (limited to 'stdlib/source/documentation/lux/data')
-rw-r--r--stdlib/source/documentation/lux/data/color.lux112
-rw-r--r--stdlib/source/documentation/lux/data/color/named.lux10
2 files changed, 5 insertions, 117 deletions
diff --git a/stdlib/source/documentation/lux/data/color.lux b/stdlib/source/documentation/lux/data/color.lux
deleted file mode 100644
index 768fb1ffb..000000000
--- a/stdlib/source/documentation/lux/data/color.lux
+++ /dev/null
@@ -1,112 +0,0 @@
-(.require
- [library
- [lux (.except)
- ["$" documentation]
- [data
- ["[0]" text (.only \n)
- ["%" \\format (.only format)]]
- [collection
- ["[0]" list (.use "[1]#[0]" monoid)]]]
- [meta
- ["[0]" code (.only)
- ["<[1]>" \\parser]]
- [macro
- [syntax (.only syntax)]
- ["[0]" template]]]]]
- [\\library
- ["[0]" /]]
- ["[0]" /
- ["[1][0]" named]])
-
-(def palette_documentation
- (syntax (_ [[_ name] <code>.symbol])
- (in (list (code.text (format "A " (text.replaced "_" "-" name) " palette."))))))
-
-(`` (def .public documentation
- (List $.Documentation)
- (let [encoding (list ($.definition /.of_rgb)
- ($.definition /.rgb)
-
- ($.definition /.HSL
- "Hue-Saturation-Lightness color format.")
-
- ($.definition /.hsl)
- ($.definition /.of_hsl)
-
- ($.definition /.hsb)
- ($.definition /.of_hsb)
-
- ($.definition /.HSB
- "Hue-Saturation-Brightness color format."))
- transformation (list ($.definition /.gray_scale)
- ($.definition /.darker)
- ($.definition /.brighter)
- ($.definition /.saturated)
- ($.definition /.un_saturated)
-
- ($.definition /.complement
- "The opposite color."
- ($.example (complement color)))
-
- ($.definition /.interpolated
- ""
- ($.example (interpolated ratio end start))))
- alpha (list ($.definition /.Alpha
- "The degree of transparency of a pigment.")
-
- ($.definition /.transparent
- "The maximum degree of transparency.")
-
- ($.definition /.translucent
- "The medium degree of transparency.")
-
- ($.definition /.opaque
- "The minimum degree of transparency."))
- scheme (list ($.definition /.Spread)
- ($.definition /.Palette)
-
- ($.definition /.analogous
- (palette_documentation /.analogous)
- ($.example (analogous spread variations color)))
-
- ($.definition /.monochromatic
- (palette_documentation /.monochromatic)
- ($.example (monochromatic spread variations color)))
-
- (,, (with_template [<name>]
- [(`` ($.definition <name>
- (format "A "
- (text.replaced "_" "-" (,, (template.text [<name>])))
- " color scheme.")))]
-
- [/.triad]
- [/.clash]
- [/.split_complement]
- [/.square]
- [/.tetradic]
- )))]
- (list.partial ($.module /._
- "")
-
- ($.definition /.Color
- "A color value, independent of color format.")
-
- ($.definition /.equivalence)
- ($.definition /.hash)
- ($.definition /.black)
- ($.definition /.white)
- ($.definition /.addition)
- ($.definition /.subtraction)
-
- ($.definition /.Pigment
- "A color with some degree of transparency.")
-
- (all list#composite
- encoding
- transformation
- alpha
- scheme
-
- /named.documentation
- )
- ))))
diff --git a/stdlib/source/documentation/lux/data/color/named.lux b/stdlib/source/documentation/lux/data/color/named.lux
index 49eb0847d..fe90ee829 100644
--- a/stdlib/source/documentation/lux/data/color/named.lux
+++ b/stdlib/source/documentation/lux/data/color/named.lux
@@ -12,17 +12,17 @@
["[0]" nat (.use "hex#[0]" hex)]]]]]
[\\library
["[0]" / (.only)
- ["/[1]" // (.only)
+ [//
["[0]" rgb]]]])
(def description
(template (_ <name>)
[($.definition <name>
- (let [[red green blue] (//.rgb <name>)
+ (let [[red green blue] <name>
[_ name] (symbol <name>)]
- (format "R:" (hex#encoded (rgb.number red))
- " G:" (hex#encoded (rgb.number green))
- " B:" (hex#encoded (rgb.number blue))
+ (format "R:" (hex#encoded red)
+ " G:" (hex#encoded green)
+ " B:" (hex#encoded blue)
" | " (text.replaced "_" " " name))))]))
(`` (def .public documentation