{"id":25328469,"url":"https://github.com/tudeorangbiasa/ansicolorcpp","last_synced_at":"2026-06-29T08:31:22.409Z","repository":{"id":276411430,"uuid":"929212679","full_name":"TudeOrangBiasa/ansicolorcpp","owner":"TudeOrangBiasa","description":"Simple ANSI escape color code to print colored text or background in terminal using c++","archived":false,"fork":false,"pushed_at":"2025-02-08T03:43:36.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-07T13:43:30.817Z","etag":null,"topics":["ansi","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TudeOrangBiasa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-08T02:55:32.000Z","updated_at":"2025-02-08T03:43:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"a81f6b27-a42f-4a0f-b444-54b9e83216a2","html_url":"https://github.com/TudeOrangBiasa/ansicolorcpp","commit_stats":null,"previous_names":["tudeorangbiasa/ansicolorcpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TudeOrangBiasa/ansicolorcpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TudeOrangBiasa%2Fansicolorcpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TudeOrangBiasa%2Fansicolorcpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TudeOrangBiasa%2Fansicolorcpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TudeOrangBiasa%2Fansicolorcpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TudeOrangBiasa","download_url":"https://codeload.github.com/TudeOrangBiasa/ansicolorcpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TudeOrangBiasa%2Fansicolorcpp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261020955,"owners_count":23098244,"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":["ansi","cpp"],"created_at":"2025-02-14T02:33:37.730Z","updated_at":"2026-06-29T08:31:22.389Z","avatar_url":"https://github.com/TudeOrangBiasa.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ANSI Color CPP\n\nThis project demonstrates the usage of ANSI escape codes to print colored text in the terminal using C++. It includes functions to set foreground and background colors, as well as text formatting options like bold, italic, and underline.\n\n## Files\n\n- `example/example.cpp`: Example usage of the color functions.\n- `color.cpp`: Implementation of the color functions.\n- `color.h`: Header file declaring the color functions.\n\n## Usage\n\n1. **Clone the repository:**\n    ```sh\n    git clone https://github.com/TudeOrangBiasa/ansicolorcpp.git\n    cd ansiColorCPP\n    ```\n\n2. **Compile the code:**\n    ```sh\n    g++ -Wall -std=c++11 color.cpp example/example.cpp -o ansi_demo\n    ```\n\n3. **Run the example:**\n    ```sh\n    ./ansi_demo\n    ```\n\n## Functions\n\n### Text Formatting\n\n- `reset()`: Resets all text formatting.\n- `bold()`: Makes text bold.\n- `faint()`: Makes text faint.\n- `italic()`: Makes text italic.\n- `underline()`: Underlines text.\n- `inverse()`: Inverts text color.\n- `strikethrough()`: Strikes through text.\n\n### Foreground Colors\n\n- `fgBlack()`, `fgRed()`, `fgGreen()`, `fgYellow()`, `fgBlue()`, `fgMagenta()`, `fgCyan()`, `fgWhite()`\n- `fgBrightBlack()`, `fgBrightRed()`, `fgBrightGreen()`, `fgBrightYellow()`, `fgBrightBlue()`, `fgBrightMagenta()`, `fgBrightCyan()`, `fgBrightWhite()`\n\n### Background Colors\n\n- `bgBlack()`, `bgRed()`, `bgGreen()`, `bgYellow()`, `bgBlue()`, `bgMagenta()`, `bgCyan()`, `bgWhite()`\n- `bgBrightBlack()`, `bgBrightRed()`, `bgBrightGreen()`, `bgBrightYellow()`, `bgBrightBlue()`, `bgBrightMagenta()`, `bgBrightCyan()`, `bgBrightWhite()`\n\n## Example\n\n```cpp\n#include \u003ciostream\u003e\n#include \"color.h\"\n\nint main() {\n    std::cout \u003c\u003c fgRed() \u003c\u003c \"This is red text\" \u003c\u003c reset() \u003c\u003c std::endl;\n    std::cout \u003c\u003c bgGreen() \u003c\u003c \"This is text with green background\" \u003c\u003c reset() \u003c\u003c std::endl;\n    return 0;\n}\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftudeorangbiasa%2Fansicolorcpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftudeorangbiasa%2Fansicolorcpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftudeorangbiasa%2Fansicolorcpp/lists"}