code: public static AccentPalette getPalette(Context context) {
          Resources resources = context.getResources();
          if (!(resources instanceof AccentResources))
              return null;
          return ((AccentResources)resources).getPalette();
      }
docs: Get the AccentPalette instance from the the context.
  @return It might return null if HoloAccent has not been correctly configured.