
import 'package:flutter/material.dart';

class ColorConstants {
  static const primaryColor = Color(0xFF662582);
  static Color? primaryColor1 = const Color(0xFFE7D3EF);
  static Color? secondaryColor = Colors.white;
  static Color? ternaryColor = "#E7D3EF".toColor();
  static Color? darkGreyColor = "575756".toColor();
  static Color? lightGrey = "b2b2b2".toColor();
  static Color? lightGreyBg = Colors.grey.shade100;
  static Color? greenColor = "00b894".toColor();
  static Color? mintColor = "69c0ac".toColor();
  static Color restaurantColor = Colors.amber[100]!;
  static Color groceriesColor = Colors.purple[100]!;
  static Color shoppingColor = Colors.orange[100]!;
  static Color healthColor = Colors.cyan[100]!;
  static Color handymanColor = Colors.red[100]!;
  static const blueColor = 0xff007AC2;
  static const redColor = 0xffEF3F42;
  static const orangeColor = 0xffFAAB53;
  static Color? lightColor = const Color.fromRGBO(244, 244, 244, 1);
}

extension ColorExtenstion on String {
  // ignore: body_might_complete_normally_nullable
  Color? toColor() {
    var hexColor = replaceAll("#", "");
    if (hexColor.length == 6) {
      hexColor = "FF$hexColor";
    }
    if (hexColor.length == 8) {
      return Color(int.parse("0x$hexColor"));
    }
  }
}