We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f697800 commit e104efdCopy full SHA for e104efd
packages/tiled/lib/src/common/color.dart
@@ -1,5 +1,7 @@
1
part of tiled;
2
3
+/// Basic data class holding a Color in ARGB format.
4
+/// This can be converted to dart:ui's Color using the flame_tiled package
5
class ColorData {
6
static int _sub(int hex, int index) => (hex >> index * 8) & 0x000000ff;
7
@@ -8,7 +10,7 @@ class ColorData {
8
10
final int blue;
9
11
final int alpha;
12
- /// Format: aarrggbb
13
+ /// Parses the Color from an int using the lower 32-bits and tiled's format: 0xaarrggbb
14
ColorData.hex(int hex)
15
: alpha = _sub(hex, 3),
16
red = _sub(hex, 2),
packages/tiled/test/color.dart
@@ -22,4 +22,4 @@ void main() {
22
expect(data.blue, equals(blue));
23
});
24
25
-}
+}
0 commit comments