code: private void obtainNavigationSelectionColor() {
          int color;
  
          try {
              color = ThemeUtil.getColor(this, R.attr.navigationSelectionColor);
          } catch (NotFoundException e) {
              color = ContextCompat.getColor(this, R.color.preference_selection_color_light);
          }
  
          setNavigationSelectionColor(color);
      }
docs: Obtains the background color of the currently selected navigation preference from the
  activity's theme.