You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

53 lines
1.9 KiB

  1. import 'package:flutter/material.dart';
  2. import 'dart:math';
  3. MaterialColor createMaterialColor(Color color) {
  4. List strengths = <double>[.05];
  5. Map<int, Color> swatch = <int, Color>{};
  6. final int r = color.red, g = color.green, b = color.blue;
  7. for (int i = 1; i < 10; i++) {
  8. strengths.add(0.1 * i);
  9. }
  10. for (var strength in strengths) {
  11. final double ds = 0.5 - strength;
  12. swatch[(strength * 1000).round()] = Color.fromRGBO(
  13. r + ((ds < 0 ? r : (255 - r)) * ds).round(),
  14. g + ((ds < 0 ? g : (255 - g)) * ds).round(),
  15. b + ((ds < 0 ? b : (255 - b)) * ds).round(),
  16. 1,
  17. );
  18. }
  19. return MaterialColor(color.value, swatch);
  20. }
  21. Color randomColor() {
  22. return Color.fromARGB(
  23. 255, Random().nextInt(256), Random().nextInt(256), Random().nextInt(256));
  24. }
  25. const Color bottomNavBg = Color.fromARGB(255, 31, 33, 39);
  26. const Color silver = Color.fromARGB(255, 194, 195, 197);
  27. const Color white = Colors.white;
  28. const Color whiteGrey = Color.fromARGB(255, 224, 224, 224);
  29. const Color inputBgColor = Color.fromARGB(255, 44, 46, 53);
  30. const Color chatBlue = Color.fromARGB(255, 80, 158, 171);
  31. // const Color white = Colors.black;
  32. const Color bgColor = Color.fromARGB(255, 18, 19, 24);
  33. // const Color bgColor = Colors.grey;
  34. const Color blue = Color.fromARGB(255, 72, 90, 255);
  35. const Color lightBlue = Color.fromARGB(255, 55, 56, 110);
  36. const Color deepBlue = Color.fromARGB(255, 18, 19, 41);
  37. const Color black = Color.fromARGB(255, 31, 32, 35);
  38. const Color red = Color.fromARGB(255, 225, 118, 129);
  39. const Color lightRed = Color.fromARGB(255, 224, 143, 152);
  40. const Color orange = Color.fromARGB(255, 235, 176, 41);
  41. const Color lightOrange = Color.fromARGB(255, 234, 200, 120);
  42. const Color clean = Colors.transparent;
  43. const Color grey = Color.fromARGB(255, 129, 129, 130);
  44. const Color lightGrey = Color.fromARGB(255, 228, 228, 228);
  45. const Color green = Color.fromARGB(255, 41, 196, 72);
  46. const Color lightGreen = Color.fromARGB(255, 137, 214, 153);