-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.dart
22 lines (18 loc) · 974 Bytes
/
styles.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import 'package:flutter/material.dart';
const Color hotNSweetBlue = Color.fromRGBO(1, 12, 142, 1);
const Color jagermeisterGreen = Color.fromRGBO(11, 38, 16, 1);
MaterialColor colorToMaterialColor(Color color) {
final Map<int, Color> mapped = <int, Color>{
50: Color.fromRGBO(color.red, color.green, color.blue, 0.1),
100: Color.fromRGBO(color.red, color.green, color.blue, 0.2),
200: Color.fromRGBO(color.red, color.green, color.blue, 0.3),
300: Color.fromRGBO(color.red, color.green, color.blue, 0.4),
400: Color.fromRGBO(color.red, color.green, color.blue, 0.5),
500: Color.fromRGBO(color.red, color.green, color.blue, 0.6),
600: Color.fromRGBO(color.red, color.green, color.blue, 0.7),
700: Color.fromRGBO(color.red, color.green, color.blue, 0.8),
800: Color.fromRGBO(color.red, color.green, color.blue, 0.9),
900: Color.fromRGBO(color.red, color.green, color.blue, 1.0),
};
return MaterialColor(color.value, mapped);
}