public static String loadLastColor(Context context){
  try {
    SharedPreferences sharedPreferences=context.getSharedPreferences("colpick",Context.MODE_PRIVATE);
    String s=sharedPreferences.getString(SP_KEY_LAST_COLOR,null);
    Color.parseColor(s);
    return s;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}

public static String loadLastColor ( Context context ) { try { SharedPreferences sharedPreferences = context . getSharedPreferences ( "colpick" , Context . MODE_PRIVATE ) ; String s = sharedPreferences . getString ( SP_KEY_LAST_COLOR , null ) ; Color . parseColor ( s ) ; return s ; } catch ( Exception e ) { e . printStackTrace ( ) ; return null ; } }
gets the color stored in shared preferences as the last picked color or null if it doesn ' t exist
