ColorPickerPreference class by Sergey Margaritov