{"id":20481459,"url":"https://github.com/ethanbaker/cpick","last_synced_at":"2025-10-18T19:34:00.319Z","repository":{"id":57569637,"uuid":"332071283","full_name":"ethanbaker/cpick","owner":"ethanbaker","description":"An extensive color picker for the terminal!","archived":false,"fork":false,"pushed_at":"2023-07-18T22:16:53.000Z","size":4199,"stargazers_count":14,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T05:12:30.569Z","etag":null,"topics":["arch","color","color-picker","colors","cview","golang","terminal"],"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":"2021-01-22T21:55:51.000Z","updated_at":"2025-01-02T13:57:17.000Z","dependencies_parsed_at":"2024-06-20T17:16:22.622Z","dependency_job_id":"e28dbc78-7fe7-4a76-9021-84e6b57d9357","html_url":"https://github.com/ethanbaker/cpick","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanbaker%2Fcpick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanbaker%2Fcpick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanbaker%2Fcpick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanbaker%2Fcpick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethanbaker","download_url":"https://codeload.github.com/ethanbaker/cpick/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724629,"owners_count":21151561,"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":["arch","color","color-picker","colors","cview","golang","terminal"],"created_at":"2024-11-15T16:08:32.753Z","updated_at":"2025-10-08T11:33:34.240Z","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\nHere are different preset \"variables\" that you can search and replace in this template.\n--\u003e\n\n\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\n\u003c!-- PROJECT SHIELDS/BUTTONS --\u003e\n![1.3.0](https://img.shields.io/badge/status-1.3.0-red)\n[![GoDoc](https://godoc.org/github.com/ethanbaker/cpick?status.svg)](https://godoc.org/github.com/ethanbaker/cpick)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ethanbaker/cpick)](https://goreportcard.com/report/github.com/ethanbaker/cpick)\n[![Go Coverage](https://github.com/ethanbaker/cpick/wiki/coverage.svg)](https://raw.githack.com/wiki/ethanbaker/cpick/coverage.html)\n\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\u003c!-- PROJECT LOGO --\u003e\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ethanbaker/cpick\"\u003e\n    \u003cimg src=\"./docs/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eCpick\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    An extensive color picker for the terminal\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  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\u003c!-- ABOUT --\u003e\n## About\n\n![Project demonstration image][product-screenshot]\n\nCpick is an interactive color picker in the terminal. You can run Cpick in any true color terminal, and you can see thousands of unique colors, either from preset values or gradients. Each color has its own formats in many different forms, including RGB, HSV, CMYK, and more. \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* [Cview](https://code.rocketnine.space/tslocum/cview)\n* [Tcell](https://github.com/gdamore/tcell)\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\nCpick depends on [Tcell](github.com/gdamore/tcell) and [Colors](github.com/ethanbaker/colors).\n\nCpick also uses [Cview](gitlab.com/tslocum/cview). However, Cview currently has a feature where the table cells are drawn with a required space in between cells, which ruins the aesthetic of Cpick. In order to fix this, a forked version of Cview is used within the Cpick package that has the required fixes. This may lead to bugs and issues in older versions of Cview that are not able to be readily fixed until Cview adopts required features.\n\n\n### Prerequisites\n\n* Golang is installed\n* Git is installed\n* Your terminal is [true color compatible](https://unix.stackexchange.com/questions/450365/check-if-terminal-supports-24-bit-true-color)\n\n\n### Installation\n\n#### Golang \n\nTo include the Cpick package in your own Golang application, include the line `import \"github.com/ethanbaker/cpick\"`.\n\nTo make a command based on the package, run `go install` in the `cmd/cpick` directory. Command usage can be found in the [documentation][documentation-url]. If you have difficulties compiling and installing the application, follow [these comprehensive steps](https://go.dev/doc/tutorial/compile-install) in the official Golang documentation.\n\nCpick also utilizes [cmdtab](https://github.com/rwxrob/cmdtab), which offers tab completion for Cpick. If you wish to enable tab completion, add the line `complete -C cpick cpick` to your `~/.bashrc` file.\n\n#### Arch Linux (Arch User Repository)\n\nVisit the [AUR page](https://aur.archlinux.org) to download Cpick to your arch system. If you don't know how to download a package from the Arch User Repository, you can follow directions from the [Arch wiki](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages).\n\n#### Ubuntu/Debian\n\nComing soon!\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\nCpick can be used to select any color and output the corresponding color format. For example, entering the command `cpick hex` will output a hexadecimal color (ex: `#123abc`) when a color is selected. Many different color formats exist, such as ansi escape sequences, rgb values, or even color names.\n\nFor more examples, please refer to the [documentation][documentation-url].\n\n#### Controls/Keys\n\nIf you are looking for a simplified version, check out the [docs](https://github.com/ethanbaker/cpick/blob/master/colors.go). Here is a more in-depth explanation.\n\nYou can also see a minified help version by pressing backtick (\\`) while the Cpick application is running.\n\nIn Cpick, there are two main screens: the **hue screen** and the **saturation-value screen**.\n\nThe **hue screen** is the first screen that pops up. It contains a hue slider present at the top, two color tint previews on the left, and a table of different preset or custom colors at the bottom.\n\nThe **saturation-value screen** is the screen that pops up once you press enter to select a color on the **hue screen**. It contains one large color gradient in the center and two color tint previews on the right.\n\nOn the **hue screen**, you initially start off on the hue slider. This is where you can select a specific hue by navigating the table, either using h and l (from vim) or the left and right arrow keys. If you press enter, you will be moved to the **saturation-value** screen with the table representing the hue you chose. You can also press space to move to the listed colors at the bottom of the **hue screen**.\n\nFor the listed color table on the **hue screen**, you can navigate it using the standard vim keys (h, j, k, l) or the arrow keys. If you press enter on a selected color, you will be taken to the **saturation-value screen** and the color you selected will automatically be selected on the big color gradient table. You can also switch between color types by pressing c to go forward a page and C to go back.\n\nIn addition, you can press ? to open up a search menu. Here you can search for a specific color or keyword. You can press N to go to the next selection and n to go to the previous selection, just like in vim. \n\nOn the **saturation-value screen**, you can move about the screen using the standard vim keys (h, j, k, l) or the arrow keys. Once on a desired color, press enter to select it.\n\nIn addition, you can press g to go to the start of the table (top-left most cell) or G to go to the end of the table (bottom-right most cell).\n\nYou can press 'q' or Escape to exit the application at any point, except in the search screen (Escape brings you back to the **hue screen** and 'q' is treated as a normal letter).\n\n#### Custom Colors\n\nIn Cpick, you can add custom colors that can come up on the color pages. You can add JSON files that hold the colors in 3 ways.\n\n1. **Local Environment**\n\nWherever you are running Cpick, you can provide a local `colors.json` file (file would have the path `./colors.json` from wherever Cpick is being run). This has the highest priority.\n\n2. **~/.config Directory**\n\nIn the `~/.config` directory, you can create a `cpick` directory that can contain the `colors.json` file (file would have the path `~/.config/cpick/colors.json`). This has a lower priority than a local file but a higher priority than a `./cpick` directory.\n\n3. **~/.cpick Directory**\n\nIn your home directory, you can create a `.cpick` directory that can contain the `colors.json` file (file would have the path `~/.cpick/colors.json`). This has the lowest priority.\n\nThe `colors.json` file has a very strict format. \n\n~~~json\n{\n  \"colorList\": [\n    {\n      \"name\": \"COLOR NAME 1\",\n      \"colors\": []\n    },\n\n    {\t\n      \"name\": \"COLOR NAME 2\",\n      \"colors\": []\n    },\n\n    {\t\n      \"name\": \"COLOR NAME 3\",\n      \"colors\": []\n    }\n\n  ]\n}\n~~~\n\nEach color type consists of an object with a `name` and `colors` key. The `name` key consists of what color type the colors provided are, such as CSS, Solarized, or XTERM. The `colors` key holds all of the colors that will be previewed when Cpick is run. All of the different color types are in the `colorList` array.\n\nAn individual color is an object that consists of two keys: `name` and `value`. `name` is the name of the color and `value` is the hexadecimal value of the color as a string. The \"#\" for the hexadecimal value is optional.\n\n~~~json\n\"colors\": [\n  {\"name\": \"Red\",   \"value\": \"#FF0000\"},\n  {\"name\": \"Green\", \"value\": \"#00FF00\"},\n  {\"name\": \"Blue\",  \"value\": \"#0000FF\"}\n]\n~~~\n\nCpick comes with three color types as a default: CSS, Solarized, and XTERM. In order to fix complicated import problems, the JSON data is present in the [colors.go](https://github.com/ethanbaker/cpick/blob/master/colors.go) file as a string. The preset data always has the lowest priority for being used.\n\n#### Testing\n\nCpick has a testing mode that can only be enabled by calling `Start` with testing mode enabled. This automatically happens when you run `go test` in the `cpick` directory.\n\nAll of the tests can be found in the [tests.go](https://github.com/ethanbaker/cpick/blob/master/tests.go) file.\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] Version 1.2.0\n    - [x] Color Searching\n- [ ] Version 1.3.0\n    - [ ] Black Box Testing\n    - [ ] Application Breakpoints\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. Review the [documentation][documentation-url] and make sure the issue is actually present or the suggestion is not included. Please share issues/suggestions on the [issue tracker][issues-url].\n\nFor patches and feature additions, please submit them as [pull requests][pulls-url].  Please adhere to the [conventional commits][conventional-commits-url]. standard for commit messaging. In addition, please try to name your git branch according to your new 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 about this license in the `LICENSE` 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/cpick][project-url]\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\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/cpick.svg\n[forks-shield]: https://img.shields.io/github/forks/ethanbaker/cpick.svg\n[stars-shield]: https://img.shields.io/github/stars/ethanbaker/cpick.svg\n[issues-shield]: https://img.shields.io/github/issues/ethanbaker/cpick.svg\n[license-shield]: https://img.shields.io/github/license/ethanbaker/cpick.svg\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?logo=linkedin\u0026colorB=555\n\n[contributors-url]: \u003chttps://github.com/ethanbaker/cpick/graphs/contributors\u003e\n[forks-url]: \u003chttps://github.com/ethanbaker/cpick/network/members\u003e\n[stars-url]: \u003chttps://github.com/ethanbaker/cpick/stargazers\u003e\n[issues-url]: \u003chttps://github.com/ethanbaker/cpick/issues\u003e\n[pulls-url]: \u003chttps://github.com/ethanbaker/cpick/pulls\u003e\n[license-url]: \u003chttps://github.com/ethanbaker/cpick/blob/master/LICENSE\u003e\n[linkedin-url]: \u003chttps://linkedin.com/in/ethandbaker\u003e\n[project-url]: \u003chttps://github.com/ethanbaker/cpick\u003e\n\n[product-screenshot]: ./docs/demonstration.gif\n[documentation-url]: \u003chttps://pkg.go.dev/github.com/ethanbaker/cpick\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%2Fcpick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethanbaker%2Fcpick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanbaker%2Fcpick/lists"}