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

Interpolation bug #17

Closed
rohan-shah opened this issue Mar 7, 2018 · 4 comments
Closed

Interpolation bug #17

rohan-shah opened this issue Mar 7, 2018 · 4 comments
Milestone

Comments

@rohan-shah
Copy link

cl.interp(cl.scales['9']['seq']['Reds'], 100) #Works
cl.interp(cl.scales['9']['seq']['Reds'], 101) #Exception
cl.interp(cl.scales['9']['seq']['Reds'], 110) #Works

I don't see why this should happen.

@rambo-yuanbo
Copy link

i ran into this bug, too.

@ancantus
Copy link

Reproduced for me as well.

.../venv/local/lib/python2.7/site-packages/colorlover/__init__.pyc in interp(scl, r)
   1821         c_i = int(i*math.floor(SCL_FI)/round(r[-1])) # start color index
   1822         hsl_o = rgb_to_hsl( scl[c_i] ) # convert rgb to hls
-> 1823         hsl_f = rgb_to_hsl( scl[c_i+1] )
   1824         section_min = c_i*r[-1]/SCL_FI
   1825         section_max = (c_i+1)*(r[-1]/SCL_FI)

IndexError: list index out of range

@jonathanrocher
Copy link

Anyone found a fix for this issue?

@jonmmease jonmmease added this to the 0.3 milestone Jan 18, 2019
@jonmmease
Copy link
Contributor

The IndexError was fixed by #9 and will be released in version 0.3.

The issue with colors not being interpolated smoothly will be tracked in #18

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

5 participants