changeset 315:48d2973faacf draft

Uploaded
author luca_milaz
date Mon, 05 Aug 2024 12:32:14 +0000
parents e8c20e0b4f27
children c96a8a3cc81e
files marea_2/flux_to_map.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/marea_2/flux_to_map.py	Mon Aug 05 12:29:48 2024 +0000
+++ b/marea_2/flux_to_map.py	Mon Aug 05 12:32:14 2024 +0000
@@ -841,7 +841,7 @@
         str: The color in hexadecimal format (e.g., '#ff0000' for red).
     """
     # Convert RGB values (0-1 range) to hexadecimal format
-    rgb = (rgb * 255).astype(int)
+    rgb = (np.array(rgb) * 255).astype(int)
     return '#{:02x}{:02x}{:02x}'.format(rgb[0], rgb[1], rgb[2])
 
 def save_colormap_image(min_value: float, max_value: float, path: str):