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

settings.color.increment.* returns Infinity #16

Open
Pabline opened this issue Dec 10, 2014 · 0 comments
Open

settings.color.increment.* returns Infinity #16

Pabline opened this issue Dec 10, 2014 · 0 comments

Comments

@Pabline
Copy link

Pabline commented Dec 10, 2014

Sometimes when use the gradient don´t colorize the words because settings.color.increment.* returns Infinity. This is caused because when you calculate this.settings.range doesn't control if all tags has weight 1 and range returns 0 then in:
"r": ( this.settings.color.end.r - this.settings.color.start.r ) / this.settings.range and G and B returns Infinity. To solve this I put an if statement to calculating if range==0 then range=1.
Here all tags are printed.

I hope I have helped
Greetings and thanks for this great script.

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

1 participant