@@ -383,7 +383,7 @@ def _render_shapes(
383383 # When groups are specified, filter out non-matching elements by default.
384384 # Only show non-matching elements if the user explicitly sets na_color.
385385 _na = render_params .cmap_params .na_color
386- if groups is not None and color_source_vector is not None and (_na .default_color_set or _na .alpha == "00" ):
386+ if groups is not None and color_source_vector is not None and (_na .default_color_set or _na .is_fully_transparent () ):
387387 keep , color_source_vector , color_vector = _filter_groups_transparent_na (
388388 groups , color_source_vector , color_vector
389389 )
@@ -535,6 +535,8 @@ def _render_shapes(
535535
536536 agg , color_span = _apply_ds_norm (agg , norm )
537537 na_color_hex = _hex_no_alpha (render_params .cmap_params .na_color .get_hex ())
538+ if render_params .cmap_params .na_color .is_fully_transparent ():
539+ nan_agg = None
538540 color_key = _build_color_key (
539541 transformed_element ,
540542 col_for_color ,
@@ -837,7 +839,7 @@ def _render_points(
837839 # When groups are specified, filter out non-matching elements by default.
838840 # Only show non-matching elements if the user explicitly sets na_color.
839841 _na = render_params .cmap_params .na_color
840- if groups is not None and color_source_vector is not None and (_na .default_color_set or _na .alpha == "00" ):
842+ if groups is not None and color_source_vector is not None and (_na .default_color_set or _na .is_fully_transparent () ):
841843 keep , color_source_vector , color_vector = _filter_groups_transparent_na (
842844 groups , color_source_vector , color_vector
843845 )
@@ -930,6 +932,8 @@ def _render_points(
930932
931933 agg , color_span = _apply_ds_norm (agg , norm )
932934 na_color_hex = _hex_no_alpha (render_params .cmap_params .na_color .get_hex ())
935+ if render_params .cmap_params .na_color .is_fully_transparent ():
936+ nan_agg = None
933937 color_key = _build_color_key (
934938 transformed_element ,
935939 col_for_color ,
@@ -1557,7 +1561,7 @@ def _render_labels(
15571561 groups is not None
15581562 and categorical
15591563 and color_source_vector is not None
1560- and (_na .default_color_set or _na .alpha == "00" )
1564+ and (_na .default_color_set or _na .is_fully_transparent () )
15611565 ):
15621566 keep_vec = color_source_vector .isin (groups )
15631567 matching_ids = instance_id [keep_vec ]
0 commit comments