Skip to content

Commit

Permalink
removed some prints, and fixed a type error for py2
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBarker-NOAA committed Jul 29, 2020
1 parent 6e03f4d commit 7c4b990
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions py_gd/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def hex_to_rgb(hex_value):


def build_from_named_colors(named_colors):
print(named_colors)
return [(name, hex_to_rgb(hex_color)) for name, hex_color in named_colors.items()]


Expand Down Expand Up @@ -86,11 +85,6 @@ def build_from_named_colors(named_colors):
for dataname in dir(_cm_listed):
if dataname.endswith("_data"):
name = dataname[:-5].lstrip("_")
print("building colormap:", name)
scheme = getattr(_cm_listed, dataname)
scheme = (np.array(scheme) * 255).round().astype(np.uint).tolist()
scheme = (np.array(scheme) * 255).round().astype(np.uint8).tolist()
colorschemes[name] = [(str(i), tuple(c)) for i, c in enumerate(scheme)]

# build named colorschemes


0 comments on commit 7c4b990

Please sign in to comment.