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

Comments

Projects
None yet
5 participants
@edwardball

edwardball commented Aug 23, 2013

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

This comment has been minimized.

Show comment
Hide comment
@DarrenN

DarrenN Aug 23, 2013

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@mattstudio

mattstudio Feb 24, 2014

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

mattstudio commented Feb 24, 2014

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

This comment has been minimized.

Show comment
Hide comment
@Martskin

Martskin 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

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

This comment has been minimized.

Show comment
Hide comment
@DarrenN

DarrenN Jul 7, 2014

Contributor

Pull requests welcome.

Contributor

DarrenN commented Jul 7, 2014

Pull requests welcome.

@jimniels

This comment has been minimized.

Show comment
Hide comment
@jimniels

jimniels Sep 27, 2016

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.

Contributor

jimniels commented Sep 27, 2016

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

This comment has been minimized.

Show comment
Hide comment
@DarrenN

DarrenN Sep 27, 2016

Contributor

What even are JavaScript numbers?

Contributor

DarrenN commented Sep 27, 2016

What even are JavaScript numbers?

@jimniels

This comment has been minimized.

Show comment
Hide comment
@jimniels

jimniels Sep 27, 2016

Contributor

Javascript numbers are strings.

Contributor

jimniels commented Sep 27, 2016

Javascript numbers are strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment