-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
getcolors used to return 255-based rgbs for white color if string, bu…
…t vcs expects 100-based rgbs (#239)
- Loading branch information
1 parent
dc1c718
commit 6806ddd
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import unittest | ||
import vcs | ||
|
||
class VCSGetcolors(unittest.TestCase): | ||
def testGetColorsRGB(self): | ||
for white_color in ["white","black","green","blue","pink","salmon","grey"]: | ||
colors = vcs.getcolors([-0.5,-0.2,0.2,0.5], white=white_color) | ||
for color in colors: | ||
if isinstance(color,(list,tuple)): | ||
r,g,b = color | ||
self.assertTrue(r<=100.) | ||
self.assertTrue(g<=100.) | ||
self.assertTrue(b<=100.) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters