eddiesigner / sketch-dark-mode

Generate a dark mode version of any Sketch document, the right way.
https://sketch-dark-mode.eduardogomez.io
62 stars 7 forks source link

Multiple colors that have the same hex color only use one replacement #33

Open himynameisubik opened 3 years ago

himynameisubik commented 3 years ago

If you have multiple colors that have the same hex color, and you define them in dark mode they will be replaced by the same hex color, instead of the set hex color.

I assume this is because the colors hex codes are identical, however this is kinda unfortunate since you end up with a "wrong" dark mode.

Defined colors: Bildschirmfoto 2021-08-13 um 12 29 06

Dark mode settings: Bildschirmfoto 2021-08-13 um 12 30 07

Result: Bildschirmfoto 2021-08-13 um 12 30 26

As you can see, the textcolor is also blue instead of the defined "black"

I'm using Sketch 73, and the colors have unique names.

leothierry commented 2 years ago

I have the same problem, this make the plug-in unusable in my case. It should be based on the name and not the Hex to switch between themes. Looked nice however :'(

p-mercury commented 2 years ago

@himynameisubik @leothierry Yea, I ran into the same issue 😅 But its a pretty simple fix, instead of search for the colours by value you simply do it by their swatch names which is possible in the newer versions of the Sketch API.

I submitted a PR but until that is merged and release you can pull my fork and build it locally 👍

It doesn't contain any breaking changes!