aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/color/named.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-30 01:12:05 -0400
committerEduardo Julian2021-07-30 01:12:05 -0400
commit9f039e8a0a09e0278547d697efa018cd3fd68672 (patch)
tree0b2298edfae39efa7195fc5152d267cc25dd7fc1 /stdlib/source/library/lux/data/color/named.lux
parent54b28c1caeda08965c258411a32229be1766d47f (diff)
More renamings.
Diffstat (limited to 'stdlib/source/library/lux/data/color/named.lux')
-rw-r--r--stdlib/source/library/lux/data/color/named.lux31
1 files changed, 26 insertions, 5 deletions
diff --git a/stdlib/source/library/lux/data/color/named.lux b/stdlib/source/library/lux/data/color/named.lux
index 8eb01d331..459ab6db8 100644
--- a/stdlib/source/library/lux/data/color/named.lux
+++ b/stdlib/source/library/lux/data/color/named.lux
@@ -1,16 +1,37 @@
(.module:
[library
[lux #*
+ [control
+ ["<>" parser
+ ["<.>" code]]]
+ [data
+ ["." text
+ ["%" format (#+ format)]]]
+ [macro
+ ["." syntax (#+ syntax:)]
+ ["." code]]
[math
[number (#+ hex)]]]]
["." // (#+ Color)])
+(syntax: (documentation {<red> <code>.text}
+ {<green> <code>.text}
+ {<blue> <code>.text}
+ {<name> <code>.local_identifier})
+ (|> <name>
+ (text.replace_all "_" " ")
+ (format <red> <green> <blue> " | ")
+ code.text
+ list
+ in))
+
(template [<red> <green> <blue> <name>]
- [(def: #export <name>
- Color
- (//.of_rgb {#//.red (hex <red>)
- #//.green (hex <green>)
- #//.blue (hex <blue>)}))]
+ [(`` (def: #export <name>
+ {#.doc (doc (~~ (..documentation <red> <green> <blue> <name>)))}
+ Color
+ (//.of_rgb {#//.red (hex <red>)
+ #//.green (hex <green>)
+ #//.blue (hex <blue>)})))]
["F0" "F8" "FF" alice_blue]
["FA" "EB" "D7" antique_white]