🎉 New colorpicker

This commit is contained in:
alonso.torres 2020-09-03 08:11:27 +02:00 committed by Andrey Antukh
parent 4e694ff194
commit 12a2b35b28
4 changed files with 428 additions and 5 deletions

View file

@ -52,6 +52,20 @@
(-> (hex->rgb data)
(conj opacity)))
(defn hex->hsl [hex]
(try
(into [] (gcolor/hexToHsl hex))
(catch :default e (do
(.log js/console e)
[0 0 0]))))
(defn hsl->rgb
[h s l]
(gcolor/hslToRgb h s l))
(defn hsl->hex [h s l]
(gcolor/hslToHex h s l))
(defn hex?
[v]
(and (string? v)

View file

@ -203,3 +203,6 @@
[b]
{:pre [(blob? b)]}
(js/URL.createObjectURL b))
(defn set-css-property [node property value]
(.setProperty (.-style node) property value))