paletteFromBrand function

IDtoColors paletteFromBrand(
  1. String brand, [
  2. IDtoColors? override
])

Build a complete palette from a single brand color; any explicit override fields win. Mirrors RN landingDefaults.paletteFromBrand.

Implementation

IDtoColors paletteFromBrand(String brand, [IDtoColors? override]) => IDtoColors(
      primary: override?.primary ?? brand,
      background: override?.background ?? '#ffffff',
      text: override?.text ?? '#18181b',
      text2: override?.text2 ?? '#71717a',
      border: override?.border ?? '#e5e5e5',
      secondary: override?.secondary ?? '#18181b',
      buttonTextColorPrimary: override?.buttonTextColorPrimary ?? contrastText(brand),
      buttonTextColorSecondary: override?.buttonTextColorSecondary ?? '#ffffff',
    );