Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
himynameisubik opened this issue Aug 13, 2021 · 2 comments

Comments

@himynameisubik
Copy link

himynameisubik commented Aug 13, 2021

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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants