Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: python
python:
- "2.6"
- "2.7"

# command to install dependencies
install:
- "pip install ."

# command to run tests
script: nosetests
5 changes: 2 additions & 3 deletions chroma/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def rgb(self, color_tuple):

@rgb256.setter
def rgb256(self, color_tuple):
self.rgb = map(lambda x: x / 255.0, color_tuple)
self.rgb = tuple(map(lambda x: x / 255.0, color_tuple))

# HLS
@property
Expand Down Expand Up @@ -270,7 +270,7 @@ def _rgb_from_hex(self, color_value):
rgb += (int(hex_value[6:8], 16) / 255.0,)

return rgb
except Exception, e:
except Exception as e:
raise ValueError('Invalid Hex Input: %s' % (color_value))

def _float_to_hex(self, float_value):
Expand Down Expand Up @@ -302,4 +302,3 @@ def _append_alpha_if_necessary(self, color_tuple):
if self.alpha is not None:
return color_tuple + (self.alpha,)
return color_tuple