{"id":20597363,"url":"https://github.com/rk0cc/github_colour_flutter","last_synced_at":"2026-04-09T18:03:54.975Z","repository":{"id":61975145,"uuid":"488562835","full_name":"rk0cc/github_colour_flutter","owner":"rk0cc","description":"Receiving ozh's github-colors repository with latest commit of colors.json to Flutter's Color object.","archived":false,"fork":false,"pushed_at":"2024-09-30T07:51:16.000Z","size":22475,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T01:08:50.563Z","etag":null,"topics":["color","colors","colour","colours","dart","flutter","github","github-colors","github-colours","package","programming-language","pub"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/github_colour","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rk0cc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"rk0cc","patreon":"rk0cc","custom":["https://www.buymeacoffee.com/rk0cc"]}},"created_at":"2022-05-04T11:34:13.000Z","updated_at":"2024-08-01T04:29:27.000Z","dependencies_parsed_at":"2024-04-20T10:01:10.734Z","dependency_job_id":"d29764d5-c73c-4e12-82a8-6b1d5bd3c481","html_url":"https://github.com/rk0cc/github_colour_flutter","commit_stats":{"total_commits":42,"total_committers":1,"mean_commits":42.0,"dds":0.0,"last_synced_commit":"baad53d09aaceec8230cc493266c5c15abab6fbb"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fgithub_colour_flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fgithub_colour_flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fgithub_colour_flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rk0cc%2Fgithub_colour_flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rk0cc","download_url":"https://codeload.github.com/rk0cc/github_colour_flutter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242231442,"owners_count":20093636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color","colors","colour","colours","dart","flutter","github","github-colors","github-colours","package","programming-language","pub"],"created_at":"2024-11-16T08:22:08.712Z","updated_at":"2025-12-31T00:59:43.824Z","avatar_url":"https://github.com/rk0cc.png","language":"C++","readme":"# Apply GitHub's languages colours into Flutter's `Color` object.\n\n![Pub Version](https://img.shields.io/pub/v/github_colour?style=flat-square)\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/rk0cc?style=flat-square)](https://github.com/sponsors/rk0cc)\n\nReceiving [ozh's github-colors](https://github.com/ozh/github-colors) repository with latest commit of [`colors.json`](https://github.com/ozh/github-colors/blob/master/colors.json) to Flutter's `Color` object.\n\nIt also provide [web demo](https://osp.rk0cc.xyz/github_colour_flutter/) for the demo.\n\n## Usage\n\nYou can either initalized `GitHubColour` before `runApp(Widget)` (Call it after `WidgetsFlutterBinding.ensureInitialized()` if want to get data from offline):\n\n```dart\n// With offline last resort\nvoid main() async {\n    WidgetsFlutterBinding.ensureInitialized();\n    await GitHubColour.initialize();\n    runApp(const YourApp());\n}\n\n// Without offline last resort\nvoid main() async {\n    await GitHubColour.initialize(offlineLastResort: false);\n    runApp(const YourApp());\n}\n```\n\nthen uses `getExistedInstance()` inside the `Widget`:\n\n```dart\nclass YourAppWidget extends StatelessWidget {\n    @override\n    Widget build(BuildContext context) =\u003e Scaffold(\n        appBar: AppBar(\n            backgroundColor: GitHubColour.getExistedInstance()[\"Go\"]\n        )\n    );\n}\n```\n\n## Cache for connection failed\n\nThis package supported caching system as a backup when making request failed. It uses LZMA compress data and store as a file under temporary directory (for VM) or store under `sembast_web` (based on IndexedDB, `3.1.0` or before was using `shared_preference`).\n\nIf no cache available, when executing `GitHubColour.initialize()`, it will uses [local's `colors.json`](lib/colors.json) as last resort. However, this package will not synchronized when newer commit of `color.json` pushed since it minified that ensure the package can be downloaded as fast as possible.\n\n## Note for American English developers\n\nIt's provide alias class `GitHubColor` for who uses \"color\" mostly.\n\n## Screenshots\n\n![C++](https://i.imgur.com/6qOSnXq.png)\n![Dart](https://i.imgur.com/uSiOYUF.png)\n\n![Go](https://i.imgur.com/Ksf3x3o.png)\n![Java](https://i.imgur.com/6Ho6RyT.png)\n\n![Python](https://i.imgur.com/yaTEp1i.png)\n\n## License\n\nBSD-3\n","funding_links":["https://github.com/sponsors/rk0cc","https://patreon.com/rk0cc","https://www.buymeacoffee.com/rk0cc"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frk0cc%2Fgithub_colour_flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frk0cc%2Fgithub_colour_flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frk0cc%2Fgithub_colour_flutter/lists"}