{"id":20481515,"url":"https://github.com/ethanbaker/colors","last_synced_at":"2026-06-01T03:31:52.762Z","repository":{"id":57524413,"uuid":"236086596","full_name":"ethanbaker/colors","owner":"ethanbaker","description":"All-things colors for golang","archived":false,"fork":false,"pushed_at":"2023-07-21T02:21:46.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-13T18:26:32.735Z","etag":null,"topics":["ansi","cmyk","color","colors","golang","hex","hsl","hsv","rgb"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ethanbaker.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":"2020-01-24T21:28:05.000Z","updated_at":"2023-07-21T02:19:39.000Z","dependencies_parsed_at":"2024-11-15T16:18:44.971Z","dependency_job_id":null,"html_url":"https://github.com/ethanbaker/colors","commit_stats":null,"previous_names":["ethanbaker/go-colors"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ethanbaker/colors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanbaker%2Fcolors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanbaker%2Fcolors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanbaker%2Fcolors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanbaker%2Fcolors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethanbaker","download_url":"https://codeload.github.com/ethanbaker/colors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanbaker%2Fcolors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33759178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"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","cmyk","color","colors","golang","hex","hsl","hsv","rgb"],"created_at":"2024-11-15T16:08:41.566Z","updated_at":"2026-06-01T03:31:52.741Z","avatar_url":"https://github.com/ethanbaker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n  Created by: Ethan Baker (contact@ethanbaker.dev)\n  \n  Adapted from:\n    https://github.com/othneildrew/Best-README-Template/\n--\u003e\n\n\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\n\u003c!-- PROJECT SHIELDS/BUTTONS --\u003e\n\u003c!-- \n  Netlify buttons:\n[![Netlify Status]()]()\n  Golang specific buttons:\nNEED GITHUB WORKFLOW \n--\u003e\n![1.0.0](https://img.shields.io/badge/status-1.0.0-red)\n[![GoDoc](https://godoc.org/github.com/ethanbaker/colors?status.svg)](https://godoc.org/github.com/ethanbaker/colors)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ethanbaker/colors)](https://goreportcard.com/report/github.com/ethanbaker/colors)\n[![Go Coverage](https://github.com/ethanbaker/colors/wiki/coverage.svg)](https://raw.githack.com/wiki/ethanbaker/colors/coverage.html)\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ethanbaker/colors\"\u003e\n    \u003cimg src=\"./docs/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eColors\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    ANSI Terminal Color in Golang, for Golang\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\u003c!-- ABOUT --\u003e\n## About\n\n\u003c!--![Project demonstration image][product-screenshot]--\u003e\n\nColors is an ANSI color library in Golang. Hundreds of ANSI color constants are defined for use in terminal applications in need of color. Different color helper functions exist to help convert color values between one another. \n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n### Built With\n\n* [Golang](https://go.dev/)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nBecause colors is a standalone project made completely with Go, it can be used in any repository. Simply make sure the prerequisites are met and then follow the installation steps below.\n\nColors offers hundreds of colors that can only be viewed if your terminal is [true color compatable](https://unix.stackexchange.com/questions/450365/check-if-terminal-supports-24-bit-true-color). If you terminal is not true color compatable, it may only be able to render xterm or solarized colors, leading to \"different\" colors of similar shade to look the exact same.\n\n### Prerequisites\n\n* Golang is installed\n* Git is installed\n\n### Installation\n\nTo include the Colors package in your own Golang application, include the line `import \"github.com/ethanbaker/colors\"`.\n\nIf you want to use css colors, solarized colors, or xterm colors specifically in your project, import that sub-project by including the line `import \"github.com/ethanbaker/colors/SUB_PROJECT\"`, where `SUB_PROJECT` can be `css`, `sol`, or `xterm`.\n\nTo make shell commands from the package, clone the repository and run `go install ./...` in the `cmd/` directory. Command usage can be found for each command and in the [documentation][documentation-url]. \n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\nWhen using Colors in your own program, you can easily print a wide range of colors by formatting something like this in your code:\n\n```go\nfmt.Println(css.Aqua + \"This will print the css color aqua!\" + css.AnsiReset)\n\nfmt.Println(sol.Y + \"This will print the sol color yellow!\" + sol.AnsiReset)\n\nfmt.Println(xterm.Maroon + \"This will print the xterm color maroon!\" + xterm.AnsiReset)\n```\n\n_For more examples, please refer to the [documentation][documentation-url]._\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\n- [x] CSS Colors\n- [x] Color converting utils\n- [x] Xterm Colors\n\nSee the [open issues][issues-url] for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nFor issues and suggestions, please include as much useful information as possible.\nReview the [documentation][documentation-url] and make sure the issue is actually\npresent or the suggestion is not included. Please share issues/suggestions on the\n[issue tracker][issues-url].\n\nFor patches and feature additions, please submit them as [pull requests][pulls-url]. \nPlease adhere to the [conventional commits][conventional-commits-url]. standard for\ncommit messaging. In addition, please try to name your git branch according to your\nnew patch. [These standards][conventional-branches-url] are a great guide you can follow.\n\nYou can follow these steps below to create a pull request:\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b branch_name`)\n3. Commit your Changes (`git commit -m \"commit_message\"`)\n4. Push to the Branch (`git push origin branch_name`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nThis project uses the Apache 2.0 license.\n\nYou can find more information in the [LICENSE][license-url] file.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nEthan Baker - contact@ethanbaker.dev - [LinkedIn][linkedin-url]\n\nProject Link: [https://github.com/ethanbaker/colors][project-url]\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n## Acknowledgments\n\n* [@rwxrob](https://github.com/rwxrob) for contributing and starting off this project\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/ethanbaker/colors.svg\n[forks-shield]: https://img.shields.io/github/forks/ethanbaker/colors.svg\n[stars-shield]: https://img.shields.io/github/stars/ethanbaker/colors.svg\n[issues-shield]: https://img.shields.io/github/issues/ethanbaker/colors.svg\n[license-shield]: https://img.shields.io/github/license/ethanbaker/colors.svg\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?logo=linkedin\u0026colorB=555\n\n[contributors-url]: \u003chttps://github.com/ethanbaker/colors/graphs/contributors\u003e\n[forks-url]: \u003chttps://github.com/ethanbaker/colors/network/members\u003e\n[stars-url]: \u003chttps://github.com/ethanbaker/colors/stargazers\u003e\n[issues-url]: \u003chttps://github.com/ethanbaker/colors/issues\u003e\n[pulls-url]: \u003chttps://github.com/ethanbaker/colors/pulls\u003e\n[license-url]: \u003chttps://github.com/ethanbaker/colors/blob/master/LICENSE\u003e\n[linkedin-url]: \u003chttps://linkedin.com/in/ethandbaker\u003e\n[project-url]: \u003chttps://github.com/ethanbaker/colors\u003e\n\n[product-screenshot]: path_to_demo\n[documentation-url]: \u003chttps://pkg.go.dev/github.com/ethanbaker/colors\u003e\n\n[conventional-commits-url]: \u003chttps://www.conventionalcommits.org/en/v1.0.0/#summary\u003e\n[conventional-branches-url]: \u003chttps://docs.microsoft.com/en-us/azure/devops/repos/git/git-branching-guidance?view=azure-devops\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanbaker%2Fcolors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethanbaker%2Fcolors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanbaker%2Fcolors/lists"}