mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 08:09:14 -05:00
♻️ Use correct function for color transformation
Regression introduced in previous refactor PR
This commit is contained in:
parent
42acdbd135
commit
99d7b7ebf8
2 changed files with 1 additions and 12 deletions
|
@ -143,7 +143,6 @@
|
|||
|
||||
;; --- fill
|
||||
|
||||
;; FIXME: revisit, this generates invalid colors
|
||||
(defn fill->shape-color
|
||||
[fill]
|
||||
(d/without-nils
|
||||
|
@ -154,16 +153,6 @@
|
|||
:ref-id (:fill-color-ref-id fill)
|
||||
:ref-file (:fill-color-ref-file fill)}))
|
||||
|
||||
(defn fill->color
|
||||
[fill]
|
||||
(d/without-nils
|
||||
{:color (:fill-color fill)
|
||||
:opacity (:fill-opacity fill)
|
||||
:gradient (:fill-color-gradient fill)
|
||||
:image (:fill-image fill)
|
||||
:id (:fill-color-ref-id fill)
|
||||
:file-id (:fill-color-ref-file fill)}))
|
||||
|
||||
(defn set-fill-color
|
||||
[shape position color opacity gradient image]
|
||||
(update-in shape [:fills position]
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
(seq fills)
|
||||
[:& h/sortable-container {}
|
||||
(for [[index value] (d/enumerate (:fills values []))]
|
||||
[:& color-row {:color (ctc/fill->color value)
|
||||
[:& color-row {:color (ctc/fill->shape-color value)
|
||||
:key index
|
||||
:index index
|
||||
:title (tr "workspace.options.fill")
|
||||
|
|
Loading…
Add table
Reference in a new issue