aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/color/named.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/color/named.lux')
-rw-r--r--stdlib/source/library/lux/data/color/named.lux13
1 files changed, 9 insertions, 4 deletions
diff --git a/stdlib/source/library/lux/data/color/named.lux b/stdlib/source/library/lux/data/color/named.lux
index df8d311cf..29f58b285 100644
--- a/stdlib/source/library/lux/data/color/named.lux
+++ b/stdlib/source/library/lux/data/color/named.lux
@@ -1,17 +1,22 @@
(.require
[library
[lux (.except)
+ [control
+ ["[0]" try]]
[math
[number (.only hex)]]]]
- ["[0]" // (.only Color)])
+ ["[0]" // (.only Color)
+ ["[0]" rgb]])
... https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
(with_template [<red> <green> <blue> <name>]
[(`` (def .public <name>
Color
- (//.of_rgb [//.#red (hex <red>)
- //.#green (hex <green>)
- //.#blue (hex <blue>)])))]
+ (|> (rgb.rgb (hex <red>)
+ (hex <green>)
+ (hex <blue>))
+ try.trusted
+ //.of_rgb)))]
["F0" "F8" "FF" alice_blue]
["FA" "EB" "D7" antique_white]