diff --git a/React/Fabric/RCTConversions.h b/React/Fabric/RCTConversions.h index ba2b9cb1f..49ba41084 100644 --- a/React/Fabric/RCTConversions.h +++ b/React/Fabric/RCTConversions.h @@ -7,7 +7,17 @@ #import +#import #import +#import + +inline UIColor *_Nullable RCTUIColorFromSharedColor(const facebook::react::SharedColor &sharedColor) { + return sharedColor ? [UIColor colorWithCGColor:sharedColor.get()] : nil; +} + +inline CGColorRef RCTCGColorRefFromSharedColor(const facebook::react::SharedColor &sharedColor) { + return sharedColor ? CGColorCreateCopy(sharedColor.get()) : nil; +} inline CGPoint RCTCGPointFromPoint(facebook::react::Point point) { return {point.x, point.y};