blendOnLevel property

int? blendOnLevel
final

Sets the blend level strength of container color used on its onColor.

Use blendOnLevel value to in FlexColorScheme themes to also blend in each corresponding ColorScheme color property's color into its onColors.

If blendOnColors is false, the blendOnLevel setting only affects onSurface, onBackGround, onPrimaryContainer, onSecondaryContainer onTertiaryContainer and onErrorContainer.

If blendOnColors is true, it also impacts onPrimary, onSecondary onTertiary and onError.

The blend level is the integer decimal value of the alpha value used in the alpha blend function. It mixes one color with another by using alpha opacity value in the color of a surface put on top of another surface with opaque color and returns the result as one opaque color.

Blending the on colors results in lower contrast than when not doing so, but it still works well on lower blend levels. This design is in-line with the look one gets when using key color seeded based ColorSchemes, but this version is based on alpha blends instead of the Material Design 3 Tonal Color Palette and its tones.

Blending the on colors results in lower contrast than when not doing so, but it works well on lower blend levels. The effect can be adjusted with blendOnLevel and completely turned off by setting blendOnLevel to 0 (zero).

If undefined, defaults to 0.

Implementation

final int? blendOnLevel;