Comments (5)
Bump :(
from chroma.
except Exception, e:
raise ValueError('Invalid Hex Input: %s' % (color_value))
should be changed to
except Exception as e:
raise ValueError('Invalid Hex Input: %s' % (color_value))
but some unit tests are still failling
$ nosetests -s -v
Test alpha support / no-support with various color systems ... ok
Test input that goes beyond color system bounds ... ERROR
Test additive and subtractive mixing ... ok
Test construction of color object ... ERROR
Test equality and inequality ... ok
Test conversion between systems ... ERROR
======================================================================
ERROR: Test input that goes beyond color system bounds
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/scls/github/scls19fr/Chroma/tests/test_chroma.py", line 82, in test_bad_input
self.assertEqual(chroma.Color((300, -3, 50), 'RGB256').rgb256, chroma.Color((255, 0, 50), 'RGB256').rgb256)
File "/Users/scls/github/scls19fr/Chroma/chroma/core.py", line 35, in __init__
self.rgb256 = color_value
File "/Users/scls/github/scls19fr/Chroma/chroma/core.py", line 103, in rgb256
self.rgb = map(lambda x: x / 255.0, color_tuple)
File "/Users/scls/github/scls19fr/Chroma/chroma/core.py", line 95, in rgb
self.color = tuple(map(self._apply_float_bounds, color_tuple[:3]))
TypeError: 'map' object is not subscriptable
======================================================================
ERROR: Test construction of color object
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/scls/github/scls19fr/Chroma/tests/test_chroma.py", line 38, in test_color_initialization
self.assertEqual(chroma.Color((255, 255, 255), 'RGB256').hex, white)
File "/Users/scls/github/scls19fr/Chroma/chroma/core.py", line 35, in __init__
self.rgb256 = color_value
File "/Users/scls/github/scls19fr/Chroma/chroma/core.py", line 103, in rgb256
self.rgb = map(lambda x: x / 255.0, color_tuple)
File "/Users/scls/github/scls19fr/Chroma/chroma/core.py", line 95, in rgb
self.color = tuple(map(self._apply_float_bounds, color_tuple[:3]))
TypeError: 'map' object is not subscriptable
======================================================================
ERROR: Test conversion between systems
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/scls/github/scls19fr/Chroma/tests/test_chroma.py", line 64, in test_system_conversion
self.assertTupleAlmostEqual(chroma.Color((51, 85, 119), 'RGB256').rgb, self.c1.rgb)
File "/Users/scls/github/scls19fr/Chroma/chroma/core.py", line 35, in __init__
self.rgb256 = color_value
File "/Users/scls/github/scls19fr/Chroma/chroma/core.py", line 103, in rgb256
self.rgb = map(lambda x: x / 255.0, color_tuple)
File "/Users/scls/github/scls19fr/Chroma/chroma/core.py", line 95, in rgb
self.color = tuple(map(self._apply_float_bounds, color_tuple[:3]))
TypeError: 'map' object is not subscriptable
----------------------------------------------------------------------
Ran 6 tests in 0.015s
FAILED (errors=3)
from chroma.
Pinging @aerickson
from chroma.
@rgb256.setter
def rgb256(self, color_tuple):
self.rgb = map(lambda x: x / 255.0, color_tuple)
should be
@rgb256.setter
def rgb256(self, color_tuple):
self.rgb = tuple(map(lambda x: x / 255.0, color_tuple))
from chroma.
@lyneca Until it's merged you can install a pip from a git source. Just use a fork with the code you want.
https://stackoverflow.com/questions/16584552/how-to-state-in-requirements-txt-a-direct-github-source
from chroma.
Related Issues (20)
- Hue in degrees not percentages HOT 1
- Color detection in images
- Value Error on bad input HOT 1
- Documentation
- Contribute Documenation
- Color functions
- Rounding HOT 2
- Alpha Bug
- Refractor Tests HOT 2
- Continuous integration
- Refactor properties HOT 1
- Blending does not take alpha-channel into account
- Saturation modification API HOT 3
- New Color Coordinates
- More hex formats HOT 1
- Magic Methods (comparison, string) HOT 1
- Color difference
- Color Harmonies HOT 1
- Color mixing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chroma.