diff --git a/cal_tools/cal_tools/plotting.py b/cal_tools/cal_tools/plotting.py
index 440b4f688372b3f9f9748b19dab4b854256181a6..fc38cc93d0c796d5815d3aa2d7a6102261c0c5d6 100644
--- a/cal_tools/cal_tools/plotting.py
+++ b/cal_tools/cal_tools/plotting.py
@@ -84,7 +84,7 @@ def plot_badpix_3d(data, definitions, title=None, rebin_fac=2, azim=22.5):
     d, dims = rebin(od.astype(np.uint32), od.shape[0]//rebin_fac, od.shape[1]//rebin_fac, od.shape[2])
     xx, yy, zz = dims
     voxels = d.astype(np.bool)
-    colors = np.empty(voxels.shape, dtype=object)
+    colors = np.full(voxels.shape, '#FFFFFF')
     cols = definitions
 
     for k, c in cols.items():