{"action":"opened","issue":{"url":"https://api.github.com/repos/domokit/mojo/issues/245","labels_url":"https://api.github.com/repos/domokit/mojo/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/domokit/mojo/issues/245/comments","events_url":"https://api.github.com/repos/domokit/mojo/issues/245/events","html_url":"https://github.com/domokit/mojo/issues/245","id":88569664,"number":245,"title":"If Color constructor is passed a value > 0xFFFFFFFF, Sky crashes","user":{"login":"Hixie","id":551196,"avatar_url":"https://avatars.githubusercontent.com/u/551196?v=3","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-15T23:46:08Z","updated_at":"2015-06-15T23:46:08Z","closed_at":null,"body":"There's two bugs here, one for numbers <= max int64, and one for numbers > max int64.\r\n\r\n```dart\r\nimport 'dart:sky' as sky;\r\n\r\nimport '../resources/third_party/unittest/unittest.dart';\r\nimport '../resources/unit.dart';\r\n\r\nvoid main() {\r\n  initUnit();\r\n\r\n  test(\"paint set to black\", () {\r\n    sky.Color c = new sky.Color(0x00000000);\r\n    sky.Paint p = new sky.Paint();\r\n    p.color = c;\r\n    expect(p.toString(), equals('Paint(Color(0x00000000))'));\r\n  });\r\n\r\n  test(\"color created with out of bounds value\", () {\r\n    try {\r\n      sky.Color c = new sky.Color(0x100 << 24);\r\n      sky.Paint p = new sky.Paint();\r\n      p.color = c;\r\n    } catch (e) {\r\n      expect(e != null, equals(true));\r\n    }\r\n  });\r\n\r\n  test(\"color created with wildly out of bounds value\", () {\r\n    try {\r\n      sky.Color c = new sky.Color(1 << 1000000);\r\n      sky.Paint p = new sky.Paint();\r\n      p.color = c;\r\n    } catch (e) {\r\n      expect(e != null, equals(true));\r\n    }\r\n  });\r\n}\r\n```"}}