{"id":28043719,"url":"https://github.com/polemius/lucent","last_synced_at":"2026-04-30T10:08:53.525Z","repository":{"id":292051691,"uuid":"979676696","full_name":"polemius/lucent","owner":"polemius","description":"Lucent is a powerful and expressive terminal styling library for Dart","archived":false,"fork":false,"pushed_at":"2025-06-25T08:42:38.000Z","size":1339,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T09:39:57.944Z","etag":null,"topics":["ansi-colors","colors","dart","emoji","terminal","terminal-colors"],"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/polemius.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,"zenodo":null}},"created_at":"2025-05-07T22:30:11.000Z","updated_at":"2025-06-25T08:42:39.000Z","dependencies_parsed_at":"2025-05-11T16:55:19.625Z","dependency_job_id":null,"html_url":"https://github.com/polemius/lucent","commit_stats":null,"previous_names":["polemius/lucent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/polemius/lucent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polemius%2Flucent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polemius%2Flucent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polemius%2Flucent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polemius%2Flucent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polemius","download_url":"https://codeload.github.com/polemius/lucent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polemius%2Flucent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32460938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["ansi-colors","colors","dart","emoji","terminal","terminal-colors"],"created_at":"2025-05-11T16:55:16.235Z","updated_at":"2026-04-30T10:08:53.513Z","avatar_url":"https://github.com/polemius.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/polemius/lucent/main/assets/logo_s.png\" alt=\"Lucent Logo\" width=\"150\"\u003e\n\u003c/div\u003e\n\n**Lucent** is a powerful and expressive terminal styling library for Dart, inspired by Python's Rich. It allows you to style terminal output with ease, supporting nested styles, truecolor, and intelligent fallbacks for terminals with limited capabilities.\n\n---\n\n![Lucent Example Screenshot](https://raw.githubusercontent.com/polemius/lucent/main/assets/image.png)\n\n## ✨ Features\n\n- **Rich Markup Syntax** – Use tags like `[bold red]Error:[/]` for styled output.\n- **Truecolor Support** – Use 24-bit RGB with `[color(#ff33aa)]` or `[on rgb(255, 255, 0)]`.\n- **256-Color \u0026 4-Bit Fallbacks** – Automatically converts to nearest match based on terminal.\n- **Named Colors** – CSS-like color names: `[color(tomato)]`, `[on slategray]`, etc.\n- **Style Nesting** – Combine `[bold underline red]` and more.\n- **Dumb Terminal Detection** – Automatically disables styling for `TERM=dumb`.\n- **Manual Styling Control** – Enable/disable styling and silence warnings.\n\n---\n\n## 🚀 Getting Started\n\n### Installation\n\nAdd to `pubspec.yaml`:\n\n```yaml\ndependencies:\n  lucent: ^0.1.0\n```\n\nThen install:\n\n```bash\ndart pub get\n```\n\n### Basic Usage\n\n```dart\nimport 'package:lucent/lucent.dart';\n\nvoid main() {\n  Console.print('[bold green]Success:[/] Operation completed.');\n}\n```\n\n---\n\n## 🎨 Advanced Styling\n\n### Nested Styles\n\n```dart\nConsole.print('[bold red]Error: [underline]File not found[/][/]');\n```\n\n### Truecolor (24-bit)\n\n```dart\nConsole.print('[color(#ff33aa)]Pink Text[/]');\nConsole.print('[on rgb(255, 255, 0)]Yellow Background[/]');\n```\n\n### Named Colors\n\n```dart\nConsole.print('[color(tomato)]Tomato Text[/]');\nConsole.print('[on slategray]Slate Gray Background[/]');\n```\n\n---\n\n## 🧠 Terminal Compatibility\n\nLucent automatically detects and adapts to the terminal:\n\n| Terminal         | Output                     |\n|------------------|----------------------------|\n| TERM=dumb        | No styling (safe)          |\n| 4-bit (ANSI)     | 16 colors                  |\n| 8-bit (xterm-256)| 256-color palette          |\n| Truecolor        | Full 24-bit RGB            |\n\nManually override behavior:\n\n```dart\nenableStyling();       // Force styling on\ndisableStyling();      // Disable all styling\nsilentMode();          // Suppress warnings\n```\n\n---\n\n## 📦 API Reference\n\n- `Console.print(String markup)`\n- `enableStyling([bool enabled = true])`\n- `disableStyling()`\n- `silentMode()`\n\n---\n\n## 🧪 Examples\n\n```dart\nConsole.print('[bold blue]Info:[/] App started');\nConsole.print('[italic yellow]Warning:[/] Low disk space');\nConsole.print('[underline red]Error:[/] Connection failed');\n\nConsole.print('[bold color(tomato) on gold] Tasty styled message [/]');\n```\n\n---\n\nLucent is inspired by the [Rich](https://github.com/Textualize/rich) Python library.\n\n## TODO\n\nPlanned features to reach closer parity with Rich:\n\n- **Progress bars** – Add a `ProgressBar` utility for dynamic progress indicators.\n- **Table rendering** – Create a `Table` builder with headers, borders, and alignment options.\n- **Panels** – Provide a `Panel` widget for boxed sections of text.\n- **Syntax highlighting** – Integrate a highlighter for displaying code snippets.\n- **Logging helpers** – Offer colorized `Console.log` with optional timestamps.\n- **Traceback formatting** – Pretty-print exceptions and stack traces.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolemius%2Flucent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolemius%2Flucent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolemius%2Flucent/lists"}