Showing
4 changed files
with
3 additions
and
2 deletions
| @@ -153,8 +153,8 @@ class PdfColor { | @@ -153,8 +153,8 @@ class PdfColor { | ||
| 153 | /// Get an Hexadecimal representation of this color | 153 | /// Get an Hexadecimal representation of this color |
| 154 | String toHex() { | 154 | String toHex() { |
| 155 | final i = toInt(); | 155 | final i = toInt(); |
| 156 | - final rgb = (i & 0xffffff).toRadixString(16); | ||
| 157 | - final a = ((i & 0xff000000) >> 24).toRadixString(16); | 156 | + final rgb = (i & 0xffffff).toRadixString(16).padLeft(6, '0'); |
| 157 | + final a = ((i & 0xff000000) >> 24).toRadixString(16).padLeft(2, '0'); | ||
| 158 | return '#$rgb$a'; | 158 | return '#$rgb$a'; |
| 159 | } | 159 | } |
| 160 | 160 |
No preview for this file type
No preview for this file type
-
Please register or login to post a comment