How to use hexadecimal colours in iOS

I have develop the iOS application which based on design with hexadecimal colours (“#fff”, “#ff0000”, “#88ff0000”). To use the same in the iOS I’ve created special method witch can help me with it. Below you can see snippet of m-file.