wrapContextIfAvailable

Wraps the given Context from HarmonizedColorsOptions with the color resources being harmonized.

If harmonization is not available, provided color resources and attributes in will not be harmonized.

Return

the new context with resources being harmonized. If resources are not harmonized successfully, the context passed in will be returned.

Parameters

context

The target context.

options

The HarmonizedColorsOptions object that specifies the resource ids, color attributes to be harmonized and the color attribute to harmonize with.