{"id":33933764,"url":"https://github.com/robertwayne/iridescent","last_synced_at":"2026-04-05T01:31:38.988Z","repository":{"id":62441158,"uuid":"456395334","full_name":"robertwayne/iridescent","owner":"robertwayne","description":"Terminal text styling via ANSI escape sequences.","archived":false,"fork":false,"pushed_at":"2024-05-20T01:37:50.000Z","size":103,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-13T23:55:26.438Z","etag":null,"topics":["ansi","colors","command-line-interface","styling","terminal"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertwayne.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2022-02-07T07:08:53.000Z","updated_at":"2023-11-19T17:38:37.000Z","dependencies_parsed_at":"2024-04-29T02:37:17.102Z","dependency_job_id":"eb19d0dc-a511-4689-bbe0-25fb6eba74b1","html_url":"https://github.com/robertwayne/iridescent","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":0.4193548387096774,"last_synced_commit":"0484e8b700e8e788b85d8812da7ea4bc57ad84c2"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/robertwayne/iridescent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertwayne%2Firidescent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertwayne%2Firidescent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertwayne%2Firidescent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertwayne%2Firidescent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertwayne","download_url":"https://codeload.github.com/robertwayne/iridescent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertwayne%2Firidescent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31421869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T00:25:07.052Z","status":"ssl_error","status_checked_at":"2026-04-05T00:25:05.923Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","command-line-interface","styling","terminal"],"created_at":"2025-12-12T13:11:32.998Z","updated_at":"2026-04-05T01:31:38.981Z","avatar_url":"https://github.com/robertwayne.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iridescent\n\n\u003c!-- markdownlint-disable --\u003e\n\u003cdiv align=\"right\"\u003e\n\u003ca href=\"https://crates.io/crates/iridescent\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/iridescent?style=flat-square\" alt=\"crates.io badge\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://docs.rs/iridescent/latest/iridescent/\"\u003e\n    \u003cimg src=\"https://img.shields.io/docsrs/iridescent?style=flat-square\" alt=\"docs.rs badge\"\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"example.gif\" alt=\"terminal screenshot showing off styled output\"\u003e\n\u003c/div\u003e\n\u003c!-- markdownlint-enable --\u003e\n\n---\n\n## Features\n\n`iridescent` is a dependency-free library for styling terminal text easily.\n\nIt supports basic ANSI sequences, Xterm-256 colors, and RGB. You can operate\ndirectly on `\u0026str` and `String` types without needing to worry about\nconversions.\n\nIt is important to note that not all terminals support all features. While\n*most* modern terminals will support up to true RGB colors, certain text modes,\nsuch as `blink`, are not reliable.\n\n## Usage\n\n```toml\n[dependencies]\niridescent = { version = \"0.2\" }\n```\n\nThe only requirement is that you import the `Styled` trait into the module you\nplan on using library methods. Once you have declared it at the top of your\nmodule, the methods will be available on all `\u0026str` and `String` types.\n\nNote that all `Styled` methods can be chained, as seen in the example above\nwhere first we call the foreground method, followed by the bold method. These do\nnot have to be in any specific order.\n\n### Using Basic Colors\n\n```rust\nuse iridescent::{constants::GREEN, Styled};\n\nfn main() {\n    // Here we can use a built-in method called `.green()` to apply the color.\n    // Every basic color has a helper method for the foreground, as this is\n    // the most common thing to style.\n    let s = \"Hello\".green().bold();\n\n    // But we could manually do it this way, too. You'll need to import the\n    // color codes from the constants file, of course.\n    let s2 = \"world\".foreground(GREEN).bold();\n\n    println!(\"{}, {}!\", s, s2);\n}\n```\n\n### Using 256-bit \u0026 RGB Colors\n\n```rust\nuse iridescent::{Styled, Rgb};\n\nfn main() {\n    // We use .foreground() for a 256-bit color; in this case, 155 - or a lime green.\n    let s = \"Hello\".foreground(155).underline();\n\n    // Here we combine a 256-bit color with an RGB color. First, we set the foreground\n    // to an RGB value of (4, 11, 214) - some variant of dark blue. Next, we set\n    // the background to a value of 195 - a very light, almost white, blue. In \n    // addition, we apply some modes (underline and blink) to our text.\n    //\n    // As you can see, mixing and matching various sequence types is no problem!\n    let s2 = \"world\"\n        .foreground(\u0026[4, 11, 214])\n        .background(195)\n        .blink();\n\n    println!(\"{}, {}!\", s, s2);\n}\n```\n\n### Hexadecimal Colors\n\nAs of `v0.2`, you can now use hexadecimal color literals, as well!\n\n```rust\nuse iridescent::{Styled, constants::{RED, WHITE}};\n\nfn main() {\n    let hello = \"Hello\".foreground(\"#ff00ff\").bold();\n    let world = \"world\".foreground(\"#00ff00\").background(\"#0000ff\");\n    println!(\"{hello}, {world}!\");\n}\n```\n\nSee\n**[here](https://docs.rs/iridescent/latest/iridescent/styled/trait.Styled.html)**\nfor all the methods available.\n\n## Examples\n\nIf you have cloned the `iridescent` repository, you can run an example with the\ncommand `cargo run --example \u003cexample_name\u003e`. You can add features, if needed,\nwith --features \u003cfeature_name\u003e.\n\n\u003c!-- markdownlint-disable --\u003e\n| Example | File                                    | Description                                                              | Features   |\n|---------|-----------------------------------------|--------------------------------------------------------------------------|------------|\n| rainbow | [colors.rs](/examples/colors.rs)   | Shows off all base colors in the terminal.                               |            |\n| rgb     | [rainbow.rs](/examples/rainbow.rs) | Shows off both 8-bit and 24-bit depth randomized colors in the terminal. | `random`   |\n| modes   | [modes.rs](/examples/modes.rs)     | Shows off the various text modes in the terminal.                        |            |\n\u003c!-- markdownlint-enable --\u003e\n\n## Feature Flags\n\n\u003c!-- markdownlint-disable --\u003e\n| Flag     | Default  | Description                                                                         | Dependencies |\n|----------|----------|-------------------------------------------------------------------------------------|--------------|\n| `random` | Disabled |Enables the use of `Color::random()` and `Color::random_rgb()`                       | `rand`       |\n\u003c!-- markdownlint-enable --\u003e\n\n## License\n\nIridescent is dual-licensed under either\n\n- **[MIT License](/LICENSE-MIT)**\n- **[Apache License, Version 2.0](/LICENSE-APACHE)**\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertwayne%2Firidescent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertwayne%2Firidescent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertwayne%2Firidescent/lists"}