diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index 7ef3b233893ae9..af47b0d353ed1a 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -722,6 +722,11 @@ +(type)type : (id)json \ // iOS 13.0 RCTFallbackARGB : @(0xFFf2f2f7) }, + // Transparent Color + @"clearColor" : @{ + // iOS 13.0 + RCTFallbackARGB : @(0x00000000) + }, } mutableCopy]; // The color names are the Objective-C UIColor selector names, // but Swift selector names are valid as well, so make aliases. diff --git a/packages/rn-tester/RNTesterUnitTests/RCTConvert_UIColorTests.m b/packages/rn-tester/RNTesterUnitTests/RCTConvert_UIColorTests.m index fbb6824885a147..f58047b0af2ba4 100644 --- a/packages/rn-tester/RNTesterUnitTests/RCTConvert_UIColorTests.m +++ b/packages/rn-tester/RNTesterUnitTests/RCTConvert_UIColorTests.m @@ -154,6 +154,8 @@ - (void)testGenerateFallbacks @"systemGray4Color": @(0xFFd1d1d6), @"systemGray5Color": @(0xFFe5e5ea), @"systemGray6Color": @(0xFFf2f2f7), + // Clear Color + @"clearColor": @(0x00000000), }; #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 diff --git a/packages/rn-tester/js/examples/PlatformColor/PlatformColorExample.js b/packages/rn-tester/js/examples/PlatformColor/PlatformColorExample.js index cda369e62e1e76..345b609ac31b30 100644 --- a/packages/rn-tester/js/examples/PlatformColor/PlatformColorExample.js +++ b/packages/rn-tester/js/examples/PlatformColor/PlatformColorExample.js @@ -110,6 +110,8 @@ function PlatformColorsExample() { {label: 'systemGray4', color: PlatformColor('systemGray4')}, {label: 'systemGray5', color: PlatformColor('systemGray5')}, {label: 'systemGray6', color: PlatformColor('systemGray6')}, + // Transparent Color + {label: 'clear', color: PlatformColor('clear')}, ]; } else if (Platform.OS === 'android') { colors = [