@SuppressWarnings( "unchecked" )
	private void apply( String key, Object value, Properties properties, Set<String> jsonUIKeys ) {
		if( value instanceof Map ) {
			Map<String, Object> map = (Map<String, Object>)value;
			if( map.containsKey( "os.default" ) || map.containsKey( "os.windows" ) || map.containsKey( "os.mac" ) || map.containsKey( "os.linux" ) ) {
				String osKey = SystemInfo.isWindows ? "os.windows"
					: SystemInfo.isMacOS ? "os.mac"
					: SystemInfo.isLinux ? "os.linux" : null;
				if( osKey != null && map.containsKey( osKey ) )
					apply( key, map.get( osKey ), properties, jsonUIKeys );
				else if( map.containsKey( "os.default" ) )
					apply( key, map.get( "os.default" ), properties, jsonUIKeys );
			} else {
				for( Map.Entry<String, Object> e : map.entrySet() )
					apply( key + '.' + e.getKey(), e.getValue(), properties, jsonUIKeys );
			}
		} else {
			if( "".equals( value ) )
				return; // ignore empty value

			// ignore some properties that affect sizes
			if( key.endsWith( ".border" ) ||
				key.endsWith( ".rowHeight" ) ||
				key.equals( "ComboBox.padding" ) ||
				key.equals( "Spinner.padding" ) ||
				key.equals( "Tree.leftChildIndent" ) ||
				key.equals( "Tree.rightChildIndent" ) )
			  return; // ignore

			// ignore icons
			if( key.endsWith( "Icon" ) )
				return; // ignore

			// map keys
			key = uiKeyMapping.getOrDefault( key, key );
			if( key.isEmpty() )
				return; // ignore key

			// exclude properties (1st level)
			int dot = key.indexOf( '.' );
			if( dot > 0 && uiKeyExcludesStartsWith.contains( key.substring( 0, dot + 1 ) ) )
				return;

			// exclude properties (2st level)
			int dot2 = (dot > 0) ? key.indexOf( '.', dot + 1 ) : -1;
			if( dot2 > 0 && uiKeyExcludesStartsWith.contains( key.substring( 0, dot2 + 1 ) ) )
				return;

			// exclude properties (contains)
			for( String s : uiKeyExcludesContains ) {
				if( key.contains( s ) )
					return;
			}

			if( uiKeyDoNotOverride.contains( key ) && jsonUIKeys.contains( key ) )
				return;

			jsonUIKeys.add( key );

			String valueStr = value.toString().trim();

			// map named colors
			String uiValue = namedColors.get( valueStr );

			// parse value
			if( uiValue == null ) {
				// fix errors (missing '#' for colors)
				if( !valueStr.startsWith( "#" ) && (key.endsWith( "ground" ) || key.endsWith( "Color" )) )
					valueStr = fixColorIfValid( "#" + valueStr, valueStr );
				else if( valueStr.startsWith( "##" ) )
					valueStr = fixColorIfValid( valueStr.substring( 1 ), valueStr );
				else if( key.endsWith( ".border" ) || key.endsWith( "Border" ) ) {
					List<String> parts = StringUtils.split( valueStr, ',' );
					if( parts.size() == 5 && !parts.get( 4 ).startsWith( "#" ) ) {
						parts.set( 4, "#" + parts.get( 4 ) );
						valueStr = String.join( ",", parts );
					}
				}

				// parse value
				try {
					UIDefaultsLoader.parseValue( key, valueStr, null );
					uiValue = valueStr;
				} catch( RuntimeException ex ) {
					UIDefaultsLoader.logParseError( key, valueStr, ex, true );
					return; // ignore invalid value
				}
			}

			// wildcards
			if( applyWildcard( properties, key, uiValue ) )
				return;

			put( properties, key, uiValue );
		}
	}
http://www.jetbrains.org/intellij/sdk/docs/reference_guide/ui_themes/themes_customize.html#custom-ui-control-colors
flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java