mirror of
https://github.com/penpot/penpot.git
synced 2026-05-03 07:08:44 +00:00
♻️ Remove duplicated utility
This commit is contained in:
parent
d592a76bf1
commit
8e891fd47c
@ -6,8 +6,6 @@
|
||||
|
||||
(ns app.main.ui.inspect.common.colors
|
||||
(:require
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.types.color :as cc]
|
||||
[app.main.store :as st]
|
||||
[okulary.core :as l]
|
||||
[rumext.v2 :as mf]))
|
||||
@ -27,15 +25,3 @@
|
||||
(let [library (mf/with-memo [ref-file]
|
||||
(make-colors-library-ref :files ref-file))]
|
||||
(mf/deref library)))
|
||||
|
||||
(defn color->color-space->css-format
|
||||
[color color-space]
|
||||
(let [color-value (:color color)
|
||||
color-opacity (or (:opacity color) 1)]
|
||||
(case color-space
|
||||
"hex" color
|
||||
"rgba" (let [[r g b a] (cc/hex->rgba color-value color-opacity)]
|
||||
(dm/str "rgba(" (cc/format-rgba [r g b a]) ")"))
|
||||
"hsla" (let [[h s l a] (cc/hex->hsla color-value color-opacity)]
|
||||
(dm/str "hsla(" (cc/format-hsla [h s l a]) ")"))
|
||||
(:color color))))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user