sketch-dark-mode icon indicating copy to clipboard operation
sketch-dark-mode copied to clipboard

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

Open himynameisubik opened this issue 3 years ago • 2 comments

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.

himynameisubik avatar Aug 13 '21 10:08 himynameisubik

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 :'(

leothierry avatar Nov 29 '21 16:11 leothierry

@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!

p-mercury avatar Mar 28 '22 18:03 p-mercury