{"id":20268789,"url":"https://github.com/dammak/randomcolordart","last_synced_at":"2025-08-31T14:33:39.915Z","repository":{"id":47296665,"uuid":"300394867","full_name":"DAMMAK/RandomColorDart","owner":"DAMMAK","description":"A dart package for generating attractive random colors. it can be used for generative art, data visualization and lot more.","archived":false,"fork":false,"pushed_at":"2025-02-17T15:34:58.000Z","size":165,"stargazers_count":13,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T03:43:32.931Z","etag":null,"topics":["color-picker","colors","colortype","dart","flutter","luminosity"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DAMMAK.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2020-10-01T19:09:24.000Z","updated_at":"2025-03-03T17:52:14.000Z","dependencies_parsed_at":"2025-03-23T01:40:40.117Z","dependency_job_id":null,"html_url":"https://github.com/DAMMAK/RandomColorDart","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/DAMMAK/RandomColorDart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2FRandomColorDart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2FRandomColorDart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2FRandomColorDart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2FRandomColorDart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DAMMAK","download_url":"https://codeload.github.com/DAMMAK/RandomColorDart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2FRandomColorDart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272991572,"owners_count":25027458,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-picker","colors","colortype","dart","flutter","luminosity"],"created_at":"2024-11-14T12:20:06.795Z","updated_at":"2025-08-31T14:33:39.883Z","avatar_url":"https://github.com/DAMMAK.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RandomColor for Dart \u0026 Flutter\n\n[![CircleCI](https://circleci.com/gh/circleci/circleci-docs.svg?style=svg)](https://circleci.com/gh/DAMMAK/RandomColorDart)\n[![Github Code Size](https://img.shields.io/github/languages/code-size/DAMMAK/RandomColorDart)](https://github.com/DAMMAK/RandomColorDart)\n[![Github License](https://img.shields.io/github/license/DAMMAK/RandomColorDart)](https://github.com/DAMMAK/RandomColorDart/blob/master/LICENSE)\n[![Pub version](https://img.shields.io/pub/v/flutter_randomcolor)](https://pub.dev/packages/flutter_randomcolor)\n\nGenerate visually appealing random colors with ease in your Dart and Flutter projects.\n\n[//]: # (![Demo]\u0026#40;https://github.com/DAMMAK/RandomColorDart/blob/master/randomcolor.png\u0026#41;)\n[![Demo](https://raw.githubusercontent.com/DAMMAK/RandomColorDart/refs/heads/main/randomcolor.png)](https://randomcolor.dammak.dev/)\n\n\n[Interactive Demo](https://randomcolor.dammak.dev/)\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Usage Guide](#usage-guide)\n    - [Basic Usage](#basic-usage)\n    - [Flutter Integration](#flutter-integration)\n    - [Advanced Options](#advanced-options)\n- [API Reference](#api-reference)\n- [Examples](#examples)\n- [Contributing](#contributing)\n- [License](#license)\n- [Acknowledgements](#acknowledgements)\n\n## Features\n\n- Generate random colors with fine-tuned control\n- Specify color types, luminosity, and output formats\n- Direct integration with Flutter's `Color` class\n- Highly customizable with easy-to-use API\n- Consistent results across platforms\n\n## Installation\n\nAdd this to your package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  flutter_randomcolor: ^1.0.16\n```\n\nThen run:\n\n```bash\n$ flutter pub get\n```\n\n## Quick Start\n\n```dart\nimport 'package:flutter_randomcolor/flutter_randomcolor.dart';\n\n// Generate a random color\nvar color = RandomColor.getColor(Options());\n\n// Generate a Flutter Color object\nColor flutterColor = RandomColor.getColorObject(Options());\n```\n\n## Usage Guide\n\n### Basic Usage\n\nGenerate a random color with default options:\n\n```dart\nvar color = RandomColor.getColor(Options());\n```\n\n### Flutter Integration\n\nGet a `Color` object for direct use in Flutter widgets:\n\n```dart\nColor widgetColor = RandomColor.getColorObject(Options(\n  colorType: ColorType.blue,\n  luminosity: Luminosity.light,\n));\n\n// Use in a widget\nContainer(\n  color: widgetColor,\n  child: Text('Colored Container'),\n)\n```\n\n### Advanced Options\n\nFine-tune your color generation:\n\n```dart\nvar customColor = RandomColor.getColor(Options(\n  colorType: [ColorType.red, ColorType.blue],\n  luminosity: Luminosity.dark,\n  format: Format.rgba,\n  alpha: 0.8,\n));\n```\n\n## API Reference\n\n### `RandomColor.getColor(Options options)`\n\nReturns a color based on the specified options.\n\n### `RandomColor.getColorObject(Options options)`\n\nReturns a Flutter `Color` object based on the specified options.\n\n### `Options` class\n\n- `colorType`: `ColorType` or `List\u003cColorType\u003e`\n- `luminosity`: `Luminosity`\n- `format`: `Format`\n- `alpha`: `double` (0.0 to 1.0)\n- `count`: `int`\n\n#### ColorType\n\n`random`, `monochrome`, `red`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`\n\n#### Luminosity\n\n`random`, `dark`, `light`, `bright`\n\n#### Format\n\n`rgba`, `rgb`, `rgbArray`, `hsla`, `hex`, `hsl`, `hsva`, `hsvArray`, `hslArray`\n\n## Examples\n\n```dart\n// Bright green color in hex format\nvar brightGreen = RandomColor.getColor(Options(\n  colorType: ColorType.green,\n  luminosity: Luminosity.bright,\n  format: Format.hex\n));\n\n// Array of 5 pastel colors\nvar pastelColors = RandomColor.getColor(Options(\n  luminosity: Luminosity.light,\n  count: 5\n));\n\n// Dark red or blue with 50% opacity\nvar transparentDark = RandomColor.getColor(Options(\n  colorType: [ColorType.red, ColorType.blue],\n  luminosity: Luminosity.dark,\n  format: Format.rgba,\n  alpha: 0.5\n));\n\n\n// Flutter Color with seed options to return the same color\nvar seedColor = RandomColor.getColorObject(Options(\n  colorType: ColorType.red,\n  luminosity: Luminosity.dark,\n  format: Format.hex,\n  seed: 1234\n));\n```\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgements\n\n- Original JavaScript implementation by [David Merfield](https://github.com/davidmerfield/randomColor)\n- Dart port maintained by [DAMMAK](https://github.com/DAMMAK)\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003eAvailable in Other Languages\u003c/summary\u003e\n\n- [JavaScript](https://github.com/davidmerfield/randomColor)\n- [C#](https://github.com/nathanpjones/randomColorSharped)\n- [C++](https://github.com/xuboying/randomcolor-cpp)\n- [Go](https://github.com/hansrodtang/randomcolor)\n- [Python](https://github.com/kevinwuhoo/randomcolor-py)\n- [Swift](https://github.com/onevcat/RandomColorSwift)\n- [Objective-C](https://github.com/yageek/randomColor)\n- [Java](https://github.com/lzyzsd/AndroidRandomColor)\n- [R](https://github.com/ronammar/randomcoloR)\n- [Rust](https://github.com/elementh/random_color)\n\n\u003c/details\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdammak%2Frandomcolordart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdammak%2Frandomcolordart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdammak%2Frandomcolordart/lists"}