code: private void obtainDialogPreviewBorderColor(@NonNull final TypedArray typedArray) {
          int defaultValue = ContextCompat.getColor(getContext(),
                  R.color.color_palette_preference_default_dialog_preview_border_color);
          setDialogPreviewBorderColor(typedArray
                  .getColor(R.styleable.ColorPalettePreference_dialogPreviewBorderColor,
                          defaultValue));
      }
docs: Obtains the border color, which should be used to preview colors in the preference's dialog,
  from a specific typed array.
  
  @param typedArray
  The typed array, the border color should be obtained from, as an instance of the
  class {@link TypedArray}. The typed array may not be null