tintedSplash static method

Color tintedSplash(
  1. Color overlay,
  2. Color tint, [
  3. double factor = 1
])

Returns the FCS opinionated tinted splash color on an overlay color.

Typically the primary color is the color used as tint base. The tint effect is different for light and dark mode.

Implementation

static Color tintedSplash(Color overlay, Color tint, [double factor = 1]) {
  // Starting kAlphaSplash 0x1F = 31 = 12.16%, same as M3 opacity on pressed.
  final int usedAlpha = (kAlphaSplash * factor).round().clamp(0x00, 0xFF);
  // Tint color alpha blend into overlay kTintSplash 0xA5 = 165 = 65%
  return overlay.blendAlpha(tint, kTintSplash).withAlpha(usedAlpha);
}