Skip to content

settings.color.increment.* returns Infinity #16

@Pabline

Description

@Pabline

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions