{"id":20945050,"url":"https://github.com/yorukot/ansichroma","last_synced_at":"2026-04-13T11:31:26.521Z","repository":{"id":240484024,"uuid":"802756359","full_name":"yorukot/ansichroma","owner":"yorukot","description":"A general purpose syntax highlighter for ANSI in pure Go","archived":false,"fork":false,"pushed_at":"2024-05-19T12:37:11.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T07:40:20.191Z","etag":null,"topics":["go","golang","highlighter","highlighting","library","syntax-highlighting","terminal"],"latest_commit_sha":null,"homepage":"","language":"Go","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/yorukot.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-05-19T07:20:24.000Z","updated_at":"2025-03-05T16:01:27.000Z","dependencies_parsed_at":"2024-05-19T08:27:55.543Z","dependency_job_id":"8f059504-4fcd-4b2d-b372-b37b86509be1","html_url":"https://github.com/yorukot/ansichroma","commit_stats":null,"previous_names":["yorukot/ansi-chroma"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yorukot/ansichroma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yorukot%2Fansichroma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yorukot%2Fansichroma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yorukot%2Fansichroma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yorukot%2Fansichroma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yorukot","download_url":"https://codeload.github.com/yorukot/ansichroma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yorukot%2Fansichroma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"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":["go","golang","highlighter","highlighting","library","syntax-highlighting","terminal"],"created_at":"2024-11-18T23:46:32.797Z","updated_at":"2026-04-13T11:31:26.499Z","avatar_url":"https://github.com/yorukot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansichroma\nansichroma is a Go package for syntax highlighting text files and strings using ANSI escape codes. It supports various programming languages and styles, providing a customizable way to highlight code for terminal output.\n\nansichrom Highly based on [chroma](https://github.com/alecthomas/chroma)\n\n## Installation\nTo install ansichroma, use go get:\n\n```bash\ngo get github.com/yorukot/ansichroma\n```\n\n## Usage\n```go\ngo\nCopy code\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/yorukot/ansichroma\"\n\t\"github.com/charmbracelet/lipgloss\"\n)\n\nfunc main() {\n\t// Highlight text file\n\tpath := \"path/to/your/file.txt\"\n\tlinesToRead := 10\n\tstyle := \"monokai\"\n\tbackground := \"#1e1e2e\"\n\tresultString, err := ansichroma.HighlightFromFile(path, linesToRead, style, background)\n\tif err != nil {\n\t\tfmt.Println(\"Error:\", err)\n\t\treturn\n\t}\n\tfmt.Println(resultString)\n\n\t// Highlight text string\n\tfileContent := \"package main\\n\\nimport \\\"fmt\\\"\\n\\nfunc main() {\\n\\tfmt.Println(\\\"Hello, World!\\\")\\n}\"\n\tformat := \"go\"\n\tstyle := \"monokai\"\n\tbackground := \"#1e1e2e\"\n\tresultString, err := ansichroma.HightlightString(fileContent, format, style, background)\n\tif err != nil {\n\t\tfmt.Println(\"Error:\", err)\n\t\treturn\n\t}\n\tfmt.Println(resultString)\n}\n```\n## Documentation\nFor detailed documentation and examples, please refer to the [GoDoc page](https://pkg.go.dev/github.com/yorukot/ansichroma).\n\n## Contributing\nContributions are welcome! Feel free to open issues or submit pull requests on the GitHub repository.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyorukot%2Fansichroma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyorukot%2Fansichroma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyorukot%2Fansichroma/lists"}