code: private void obtainColorFormat(@NonNull final TypedArray typedArray) {
          int defaultValue = getContext().getResources()
                  .getInteger(R.integer.color_picker_preference_default_color_format);
          setColorFormat(ColorFormat.fromValue(typedArray
                  .getInteger(R.styleable.AbstractColorPickerPreference_colorFormat, defaultValue)));
      }
docs: Obtains the format, which should be used to print a textual representation of the
  preference's color, from a specific typed array.
  
  @param typedArray
  The typed array, the color format should be obtained from, as an instance of the
  class {@link TypedArray}. The typed array may not be null