This is absolutely doable. SKColor from SpriteKit for example, is defined like:
#if TARGET_OS_IPHONE
#define SKColor UIColor
#else
#define SKColor NSColor
#endif
And then utilized like this:
SKColor *color = [SKColor colorWithHue:0.5 saturation:1.0 brightness:1.0 alpha:1.0];
This simply takes advantage of the fact that UIColor
and NSColor
share some of their class methods.