From 30fb0dc40d595b9e0b7747ad8e5c4e8cf7e3023b Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 1 Nov 2018 21:17:55 +1100 Subject: move mmm code from lib to mmm etc --- lib/color.moon | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 lib/color.moon (limited to 'lib/color.moon') diff --git a/lib/color.moon b/lib/color.moon deleted file mode 100644 index 6233b47..0000000 --- a/lib/color.moon +++ /dev/null @@ -1,20 +0,0 @@ -rgb = (r, g, b) -> - r, g, b = table.unpack r if 'table' == type r - "rgb(#{r * 255}, #{g * 255}, #{b * 255})" - -rgba = (r, g, b, a) -> - r, g, b, a = table.unpack r if 'table' == type r - "rgba(#{r * 255}, #{g * 255}, #{b * 255}, #{a or 1})" - -hsl = (h, s, l) -> - h, s, l = table.unpack h if 'table' == type h - "hsl(#{h * 360}, #{s * 100}%, #{l * 100}%)" - -hsla = (h, s, l, a) -> - h, s, l, a = table.unpack h if 'table' == type h - "hsla(#{h * 360}, #{s * 100}%, #{l * 100}%, #{a or 1})" - -{ - :rgb, :rgba, - :hsl, :hsla, -} -- cgit v1.2.3