Showing
1 changed file
with
23 additions
and
1 deletions
| @@ -24,7 +24,27 @@ class PdfColor { | @@ -24,7 +24,27 @@ class PdfColor { | ||
| 24 | final double g; | 24 | final double g; |
| 25 | final double b; | 25 | final double b; |
| 26 | 26 | ||
| 27 | - static var black = PdfColor(0.0, 0.0, 0.0); | 27 | + static const black = PdfColor(0.0, 0.0, 0.0); |
| 28 | + static const white = PdfColor(1.0, 1.0, 1.0); | ||
| 29 | + static const red = PdfColor(0.95686, 0.26274, 0.21176); | ||
| 30 | + static const pink = PdfColor(0.91372, 0.11764, 0.38823); | ||
| 31 | + static const purple = PdfColor(0.91372, 0.11764, 0.38823); | ||
| 32 | + static const deepPurple = PdfColor(0.40392, 0.22745, 0.71765); | ||
| 33 | + static const indigo = PdfColor(0.24705, 0.31765, 0.70980); | ||
| 34 | + static const blue = PdfColor(0.12941, 0.58823, 0.95294); | ||
| 35 | + static const lightBlue = PdfColor(0.01176, 0.66274, 0.95686); | ||
| 36 | + static const cyan = PdfColor(0.0, 0.73725, 0.83137); | ||
| 37 | + static const teal = PdfColor(0.0, 0.58823, 0.53333); | ||
| 38 | + static const green = PdfColor(0.29803, 0.68627, 0.31372); | ||
| 39 | + static const lightGreen = PdfColor(0.54509, 0.76470, 0.29020); | ||
| 40 | + static const lime = PdfColor(0.80392, 0.86274, 0.22353); | ||
| 41 | + static const yellow = PdfColor(1.0, 0.92157, 0.23137); | ||
| 42 | + static const amber = PdfColor(1.0, 0.75686, 0.02745); | ||
| 43 | + static const orange = PdfColor(1.0, 0.59608, 0.0); | ||
| 44 | + static const deepOrange = PdfColor(1.0, 0.34118, 0.13333); | ||
| 45 | + static const brown = PdfColor(0.47451, 0.33333, 0.28235); | ||
| 46 | + static const grey = PdfColor(0.61961, 0.61961, 0.61961); | ||
| 47 | + static const blueGrey = PdfColor(0.37647, 0.49020, 0.54510); | ||
| 28 | 48 | ||
| 29 | const PdfColor(this.r, this.g, this.b, [this.a = 1.0]); | 49 | const PdfColor(this.r, this.g, this.b, [this.a = 1.0]); |
| 30 | 50 | ||
| @@ -47,4 +67,6 @@ class PdfColor { | @@ -47,4 +67,6 @@ class PdfColor { | ||
| 47 | (((g * 255.0).round() & 0xff) << 8) | | 67 | (((g * 255.0).round() & 0xff) << 8) | |
| 48 | (((b * 255.0).round() & 0xff) << 0)) & | 68 | (((b * 255.0).round() & 0xff) << 0)) & |
| 49 | 0xFFFFFFFF; | 69 | 0xFFFFFFFF; |
| 70 | + | ||
| 71 | + String toString() => "$runtimeType($r, $g, $b, $a)"; | ||
| 50 | } | 72 | } |
-
Please register or login to post a comment