Skip to main content

Colors

Colors for the C2C UIKits.

color-theme

C2CColorThemeData

Primary Colors

  • primary1
  • primary2
  • primary3
  • primary4

Gray Colors

  • gray1
  • gray2
  • gray3
  • gray4
  • gray5
  • gray6
  • gray7
  • black
  • white

Success Colors

  • success1
  • success2
  • success3

Error Colors

  • error1
  • error2
  • error3

Info Colors

  • info1
  • info2
  • info3

Warning Colors

  • warning1
  • warning2
  • warning3

Additional Colors

  • additionalBlue
  • additionalYellow
  • additionalOrange
  • additionalRed
  • additionalGreen
  • additionalPurple

Accessing the Color Theme

You can access the color theme data using C2CTheme.of(context) or C2CColorTheme.of(context) method within your widgets.

Example Usage

Widget build(BuildContext context) {
final colors = C2CColorTheme.of(context);
return Container(color: colors.primary3);
}

// or

Widget build(BuildContext context) {
final c2cTheme = C2CTheme.of(context);
return Container(color: colors.primary3);
}

Apply a default text style to its descendant widgets

C2CColorTheme(
data: const C2CColorThemeData(
primary3: Colors.red
),
child: Builder(builder: (context) {
return Container(color: colors.primary3);
}),
)