private void dumpColorsAsProperties( PrintWriter out ) {
		defaults.keySet().stream()
			.sorted( (key1, key2) -> {
				return String.valueOf( key1 ).compareTo( String.valueOf( key2 ) );
			} )
			.forEach( key -> {
				Color color = defaults.getColor( key );
				if( color == null )
					return;

				String strKey = String.valueOf( key );
				String prefix = keyPrefix( strKey );
				if( !prefix.equals( lastPrefix ) ) {
					lastPrefix = prefix;
					out.printf( "%n%n#---- %s ----%n%n", prefix );
				}

				out.printf( "%-50s = #%06x", strKey, color.getRGB() & 0xffffff );
				if( color.getAlpha() != 255 )
					out.printf( "%02x", (color.getRGB() >> 24) & 0xff );
				out.println();
			} );
	}
Dumps look and feel UI defaults to files.

@author Karl Tauber
flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java