@@ -409,7 +409,7 @@ an array of resource ids for the color resources you'd like to harmonize, a
409409HarmonizedColorsOptions options =
410410 new HarmonizedColorsOptions.Builder(activity)
411411 .setColorResourcesIds(colorResources)
412- .setColorAttributes(new HarmonizedColorAttributes.create(attributes))
412+ .setColorAttributes(HarmonizedColorAttributes.create(attributes))
413413 .setColorAttributeToHarmonizeWith(colorAttributeResId)
414414 .build();
415415```
@@ -451,17 +451,19 @@ our theme overlay at `R.style.ThemeOverlay_Material3_HarmonizedColors`.
451451
452452You can also use color resources harmonization separate from dynamic colors if
453453needed, but the general use case for color resources harmonization is after
454- dynamic colors have been applied. Here's an example use case to harmonize M3
455- Error colors by default in the Dynamic Colors callback:
454+ dynamic colors have been applied, to ensure visual cohesion for reserved colors
455+ (e.g. semantic colors) in a M3 theme with dynamic colors enabled. A Material
456+ suggested default when applying dynamic colors, is to harmonize M3 Error colors
457+ in the callback when constructing ` DynamicColorsOptions ` :
456458
457459```
458460DynamicColorsOptions dynamicColorOptions =
459461 new DynamicColorsOptions.Builder(activity)
460462 ...
461463 .setOnAppliedCallback(
462464 activity ->
463- HarmonizedColors.applyIfAvailable(
464- HarmonizedColorsOptions.createMaterialDefaults(activity)))
465+ HarmonizedColors.applyIfAvailable(
466+ HarmonizedColorsOptions.createMaterialDefaults(activity)))
465467 .build()
466468DynamicColors.applyIfAvailable(dynamicColorOptions);
467469```
0 commit comments