How to use hex color values

I am trying to use hex color values in Swift, instead of the few standard ones that UIColor allows you to use, but I have no idea how to do it. Example: how would I use #ffffff as a color?