Giter Site home page Giter Site logo

python-colourlovers's People

Contributors

movermeyer avatar requires avatar roadsideseb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

python-colourlovers's Issues

Cannot install package using pip: cannot find CHANGELOG.rst

[portnov]$ pip install python-colourlovers
Downloading/unpacking python-colourlovers
Downloading python-colourlovers-0.1.0.tar.gz
Running setup.py egg_info for package python-colourlovers
Traceback (most recent call last):
File "", line 16, in
File "/tmp/pip_build_portnov/python-colourlovers/setup.py", line 32, in
open('CHANGELOG.rst').read(),
IOError: [Errno 2] No such file or directory: 'CHANGELOG.rst'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 16, in

File "/tmp/pip_build_portnov/python-colourlovers/setup.py", line 32, in

open('CHANGELOG.rst').read(),

IOError: [Errno 2] No such file or directory: 'CHANGELOG.rst'

Deprecation warning at runtime

/usr/local/lib/python2.7/dist-packages/python_colourlovers-0.1.0-py2.7.egg/colourlovers/init.py:139: DeprecationWarning: This method will be removed in future versions. Use 'list(elem)' or iteration over elem instead.
if len(child.getchildren()) == 0:

Pb with cl.interp on colors scale

In [294]: import colorlover as cl              

In [295]: cl                                   
Out[295]: <module 'colorlover' from '/home/latty/.virtualenvs/screenpulse-unittest/local/lib/python2.7/site-packages/colorlover/__init__.pyc'>                                                

In [296]: colormaps = cl.scales['7']['qual']['Dark2']                                          

In [297]: colormaps                            
Out[297]:                                      
['rgb(27,158,119)',                            
 'rgb(217,95,2)',                              
 'rgb(117,112,179)',                           
 'rgb(231,41,138)',                            
 'rgb(102,166,30)',                            
 'rgb(230,171,2)',                             
 'rgb(166,118,29)']                            

In [298]: cl.interp(colormaps, 11)             
---------------------------------------------------------------------------                    
IndexError                                Traceback (most recent call last)                    
<ipython-input-298-946770f2b787> in <module>() 
----> 1 cl.interp(colormaps, 11)               

/home/latty/.virtualenvs/screenpulse-unittest/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            

this bug is not stable, here for example:

In [310]: cl.interp(colormaps, 10)
Out[310]: 
['hsl(162.0, 70.0%, 36.0%)',
 'hsl(70.6666666667, 88.6666666667%, 40.0%)',
 'hsl(72.3333333333, 75.3333333333%, 47.0%)',
 'hsl(167.0, 30.0%, 57.0%)',
 'hsl(275.0, 62.6666666667%, 54.3333333333%)',
 'hsl(248.666666667, 75.6666666667%, 48.0%)',
 'hsl(88.0, 69.0%, 38.0%)',
 'hsl(58.6666666667, 88.3333333333%, 42.6666666667%)',
 'hsl(29.3333333333, 107.666666667%, 47.3333333333%)',
 'hsl(38.0, 70.0%, 38.0%)']

In [311]: cl.interp(colormaps, 11)             
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-311-946770f2b787> in <module>() 
----> 1 cl.interp(colormaps, 11)               

/home/latty/.virtualenvs/screenpulse-unittest/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

In [312]: cl.interp(colormaps, 15)
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-312-e3b4fde92ac0> in <module>()
----> 1 cl.interp(colormaps, 15)

/home/latty/.virtualenvs/screenpulse-unittest/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

In [313]: cl.interp(colormaps, 16)
Out[313]: 
['hsl(162.0, 70.0%, 36.0%)',
 'hsl(107.2, 81.2%, 38.4%)',
 'hsl(52.4, 92.4%, 40.8%)',
 'hsl(-2.4, 103.6%, 43.2%)',
 'hsl(110.2, 57.2%, 51.0%)',
 'hsl(167.0, 30.0%, 57.0%)',
 'hsl(223.8, 2.8%, 63.0%)',
 'hsl(296.6, 69.2%, 53.8%)',
 'hsl(361.4, 88.8%, 52.2%)',
 'hsl(426.2, 108.4%, 50.6%)',
 'hsl(88.0, 69.0%, 38.0%)',
 'hsl(-8.4, 65.0%, 32.0%)',
 'hsl(-104.8, 61.0%, 26.0%)',
 'hsl(-201.2, 57.0%, 20.0%)',
 'hsl(17.6, 115.4%, 49.2%)',
 'hsl(0.0, 127.0%, 52.0%)']

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.