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

darken() => undefined is not a function #61

Closed
netsi1964 opened this issue Oct 4, 2014 · 5 comments
Closed

darken() => undefined is not a function #61

netsi1964 opened this issue Oct 4, 2014 · 5 comments

Comments

@netsi1964
Copy link

If I for instance do this: tinycolor("#f00").darken() I get:

undefined is not a function

I have tried to iterate through tinycolor and it seems that it do have the function `darken``

@netsi1964
Copy link
Author

Guess that it is only your documentation which fails :-)
The method looks like a static method, so it should be used like this:
tinycolor.darken("fff", 10)

@bgrins
Copy link
Owner

bgrins commented Oct 5, 2014

Can you check and make sure you are using the latest version? This works for me on https://bgrins.github.io/TinyColor/ (the API changed in #57 for version 1.0. If you are using an older version, then using tinycolor.darken("fff", 10) should still work fine.

@bgrins bgrins closed this as completed Oct 5, 2014
@netsi1964
Copy link
Author

You are right @bgrins - I was using tinycolor from codepen.io - and I guess that they need to update to the latest version of your code. The current version I guess is an old version:
http://cdnjs.cloudflare.com/ajax/libs/tinycolor/0.11.1/tinycolor.min.js

@bgrins
Copy link
Owner

bgrins commented Oct 5, 2014

@netsi1964 Ah I see, thanks for pointing that out. We need to bump the version for cdnjs to 1.0.0 as in #49

@bgrins
Copy link
Owner

bgrins commented Oct 7, 2014

Filed cdnjs/cdnjs#3902 to update to 1.0.0

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

No branches or pull requests

2 participants