You cannot directly, as mvds said. Furthermore, UIColorand CGColorRefare not scams without tools - why then the converter works? However (and until I recommend - use UIColorinstead!), There is a trick:
Create an autoreeased object of a UIColor object and return it to CGColor. For instance:
return [UIColor colorWith... ].CGColor;
CGColorRef , UIColor. , UIColor , CGColorRef - CGRetain(...), , . , CGColorRef -...
: . UIColor !