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

The calculated colors don't return exactly what Sass returns. #5

Open
edwardball opened this issue Aug 23, 2013 · 7 comments
Open

The calculated colors don't return exactly what Sass returns. #5

edwardball opened this issue Aug 23, 2013 · 7 comments
Labels

Comments

@edwardball
Copy link

Hi,

Love this tool, but just wanted to point out that there is a little problem in calculating the colours. I'll give you a couple of examples.

Using the tool, lightening or darkening a color by 0 changes the color, when it should actually remain the same.

Eg: #123456.
Lighten by 0 gives #133659
Darken by 0 gives #123354

And sticking with #123456, darkening it by 10% with SASS gives #091a2c, but your tool returns #09192a.

Cheers

@DarrenN
Copy link
Contributor

DarrenN commented Aug 23, 2013

Thanks for the heads up @Aptary - I suspect this is mostly due differences in how JS and Ruby treat numbers / math. Will update our tests and see if we can't get it sorted out.

@mattstudio
Copy link

I'm having the same problem. It seemed like just the tool I was looking for, until I started using it and I kept getting values that were not the same between this tool and sass. :(

SassMe: lighten(#7EB9E8, 26) --> #f2f8fd
Sass: lighten(#7EB9E8, 26) --> #eff6fc

@Martskin
Copy link

Martskin commented Jul 3, 2014

Yep, same problem here. :(
SassMe: desaturate(adjust_hue(lighten(#444346,22),3),1) -- > #7c7b7f
Sass : desaturate(adjust_hue(lighten(#444346,22),3),1) -- > #7c7b7e

@DarrenN
Copy link
Contributor

DarrenN commented Jul 7, 2014

Pull requests welcome.

@jimniels
Copy link
Contributor

The project now lives under my github jimniels/sassme (and is live at jim-nielsen.com/sassme. Any suggestions, issues, improvements, or PRs are welcome there :)

FWIW: this problem was fixed in v2 of the site I launched. The slight color differences were due to a tiny rounding error in javascript.

@DarrenN
Copy link
Contributor

DarrenN commented Sep 27, 2016

What even are JavaScript numbers?

@jimniels
Copy link
Contributor

Javascript numbers are strings.

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

No branches or pull requests

5 participants