|
- import 'package:flutter/material.dart';
- import 'dart:math';
-
- MaterialColor createMaterialColor(Color color) {
- List strengths = <double>[.05];
- Map<int, Color> swatch = <int, Color>{};
- final int r = color.red, g = color.green, b = color.blue;
-
- for (int i = 1; i < 10; i++) {
- strengths.add(0.1 * i);
- }
- for (var strength in strengths) {
- final double ds = 0.5 - strength;
- swatch[(strength * 1000).round()] = Color.fromRGBO(
- r + ((ds < 0 ? r : (255 - r)) * ds).round(),
- g + ((ds < 0 ? g : (255 - g)) * ds).round(),
- b + ((ds < 0 ? b : (255 - b)) * ds).round(),
- 1,
- );
- }
- return MaterialColor(color.value, swatch);
- }
-
- Color randomColor() {
- return Color.fromARGB(
- 255, Random().nextInt(256), Random().nextInt(256), Random().nextInt(256));
- }
-
- const Color bottomNavBg = Color.fromARGB(255, 31, 33, 39);
- const Color silver = Color.fromARGB(255, 194, 195, 197);
- const Color white = Colors.white;
- const Color whiteGrey = Color.fromARGB(255, 224, 224, 224);
- const Color inputBgColor = Color.fromARGB(255, 44, 46, 53);
-
- const Color chatBlue = Color.fromARGB(255, 80, 158, 171);
-
- // const Color white = Colors.black;
- const Color bgColor = Color.fromARGB(255, 18, 19, 24);
- // const Color bgColor = Colors.grey;
- const Color blue = Color.fromARGB(255, 72, 90, 255);
- const Color lightBlue = Color.fromARGB(255, 55, 56, 110);
- const Color deepBlue = Color.fromARGB(255, 18, 19, 41);
- const Color black = Color.fromARGB(255, 31, 32, 35);
- const Color red = Color.fromARGB(255, 225, 118, 129);
- const Color lightRed = Color.fromARGB(255, 224, 143, 152);
- const Color orange = Color.fromARGB(255, 235, 176, 41);
- const Color lightOrange = Color.fromARGB(255, 234, 200, 120);
- const Color clean = Colors.transparent;
- const Color grey = Color.fromARGB(255, 129, 129, 130);
- const Color lightGrey = Color.fromARGB(255, 228, 228, 228);
- const Color green = Color.fromARGB(255, 41, 196, 72);
- const Color lightGreen = Color.fromARGB(255, 137, 214, 153);
|