{"id":16310674,"url":"https://github.com/nkh/tcol","last_synced_at":"2025-04-14T04:42:40.672Z","repository":{"id":188557530,"uuid":"678973616","full_name":"nkh/tcol","owner":"nkh","description":"pick color in a TUI","archived":false,"fork":false,"pushed_at":"2023-08-29T20:27:39.000Z","size":202,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T09:41:59.710Z","etag":null,"topics":["color","tui"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/nkh.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}},"created_at":"2023-08-15T20:25:52.000Z","updated_at":"2023-08-15T23:02:41.000Z","dependencies_parsed_at":"2024-11-06T05:42:44.489Z","dependency_job_id":"78f28861-b77f-4ddc-8da9-10ec30ae1009","html_url":"https://github.com/nkh/tcol","commit_stats":null,"previous_names":["nkh/tcol"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh%2Ftcol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh%2Ftcol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh%2Ftcol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkh%2Ftcol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nkh","download_url":"https://codeload.github.com/nkh/tcol/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248824662,"owners_count":21167343,"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":["color","tui"],"created_at":"2024-10-10T21:42:43.878Z","updated_at":"2025-04-14T04:42:40.640Z","avatar_url":"https://github.com/nkh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\n\ttcol - interactive color picker for the terminal\n\n![TUI](https://github.com/nkh/tcol/blob/main/media/tcol_1.png)\n\n# SYNOPSIS\n    tcol [--oc --no-color-output]\n    tcol file\n\n# DESCRIPTION\n\n*tcol* allows you to pick a color in the ANSI 256 colors range. You can load a file containing colors and dynamically modify the colors; upon exit the modified colors are displayed in the terminal.\n\n# LAYOUT\n\n*tcol* will display a pane with an optional colored file display and a color picker.\n\n## Color picker\n\nThe picker consists of:\n\n- current colors swatch, changed when you move the color cursor\n- 4 colors registries which you can set if you want to modify colors\n- the main color swatch\n    - default system colors\n    - grey scales\n    - solarized colors\n    - rest of available colors\n- greyed out line with color code\n\n# MODES\n\n*tcol* had three modes of operation:\n\n| binding       | modes                              |\n| -------       | ---------------------------------- |\n| n             | normal mode                        |\n| p             | pick mode                          |\n| mm            | modification mode                  |\n\n## Normal mode\n\nMove the cursor in the color swatch, the current color and color code are updated.\n\nWhen you quite *tcol* the selected color code is displayed, you can also copy the code to the clipboard.\n\n### ForeGround / Backgroud\n\n- press 'b' to selct a background color\n- press 'f' to selct a foreground color\n\n## Pick mode\n\nIf you pass a file to *tcol*, the file will be displayed in the left pane.\n\n![TUI](https://github.com/nkh/tcol/blob/main/media/tcol_0.png)\n\n## pick color\n\nYou can select a color from the left pane and put in one of the color registries.\n\n- press 'p' to get in the pick mode\n- use the movement keys to place the cursor on the color you want to change\n\t- the current color swatch will reflect the color you're on\n- put the color in one of the modification registries with 'm[1-5]\n\n![TUI](https://github.com/nkh/tcol/blob/main/media/tcol_1.png)\n\n### fzf\n\nYou can also chose the color to put in the color registries with the help of fzf\n- press 'mf' to set current registry, 'mF' to set all registries\n- select colors with 'tab'\n- press 'enter'\n\nYou can also batch load user defined modification colors. *tcol* runs command **ansi_user_colors** which should return predefine colors.\n\n- press 'mu' to load a color in the current registry\n- press 'mU' to load a color in all the registries\n\nNote that **ansi_user_colors** is a command so you can chose a color to return in an interactive picker like FZF.\n\nThe same can be done with command **ansi_user_colors_by_name** with the following bindings\n- press 'mn' to load a color in the current registry\n- press 'mN' to load a color in all the registries\n\n![TUI](https://github.com/nkh/tcol/blob/main/media/tcol_fzf.png)\n\n## Modification mode\n\nYou can change the colors in the color registry, the left pane will reflect the changes. Note that your text is not changed only the preview.\n\n- press 'mm'\n- use the movement keys to select a new color\n    - the color registry displays the original color and the new color\n\nUse \"'[1-5]\" (quote + figure) to select a different registry to modify\n\n![TUI](https://github.com/nkh/tcol/blob/main/media/tcol_2.png)\n\n## Flip preview between modified and unmodified colors\n\nYou can go back to normal mode with 'n' and back to modify mode with 'mm'.\n\n# OUTPUT\n\n![TUI](https://github.com/nkh/tcol/blob/main/media/tcol_out.png)\n\n## Bindings\n\n| binding       | movements                          |\n| -------       | ---------------------------------- |\n| j             | scroll down                        |\n| DOWN          | scroll down                        |\n| UP            | scroll up                          |\n| k             | scroll up                          |\n| RIGHT         | move right                         |\n| l             | move right                         |\n| LEFT          | move left                          |\n| h             | move left                          |\n| J             | scroll pane 0 down                 |\n| K             | scroll pane 0 up                   |\n\n| binding       | tcol                               |\n| -------       | ---------------------------------- |\n| yy            | copy to clipboard                  |\n| yq            | copy to clipboard  and quit        |\n| Q             | quit without displaying color data |\n| q             | quit                               |\n| QUESTION_MARK | show bindings                      |\n| h             | display help                       |\n\n| binding       | colors                             |\n| -------       | ---------------------------------- |\n| b             | pick background                    |\n| f             | pick foreground                    |\n| cb            | use black color                    |\n| cw            | use white color                    |\n| cr            | reverse                            |\n| r1            | restore #1                         |\n| r2            | restore #2                         |\n| r3            | restore #3                         |\n| r4            | restore #4                         |\n\n| binding       | modes                              |\n| -------       | ---------------------------------- |\n| n             | normal mode                        |\n| p             | pick mode                          |\n| mm            | modification mode                  |\n| a             | alternate normal/modification      |\n\n| binding       | modification mode                  |\n| -------       | ---------------------------------- |\n| '1            | select #1                          |\n| '2            | select #2                          |\n| '3            | select #3                          |\n| '4            | select #4                          |\n| m1            | save #1                            |\n| m2            | save #2                            |\n| m3            | save #3                            |\n| m4            | save #4                            |\n| m5            | save #5                            |\n| mc            | set change color                   |\n| mf            | set modification color             |\n| mF            | set all modification colors        |\n| mu            | chose from user colors             |\n| mU            | chose all from user colors         |\n| mn            | chose from named colors            |\n\n# DEPENDENCIES\n\n- Bash\n- Perl\n- AWK\n- Paneless https://github.com/nkh/paneless\n\n# INSTALL\n\nClone the repository and add it to your PATH; or link/copy the files to somewhere in your PATH.\n\n## Generate Documentation\n\n***utils/gen_man_page*** can be used to generate a man page, it needs pandoc.\n\nThe documentation is this README, you will get:\n- a man page\n- *tcol -h* will display the man page\n- command 'h' will display the man page\n\n# AUTHOR\n\n\tKhemir Nadim ibn Hamouda\n\thttps://github.com/nkh\n\tCPAN ID: NKH\n    \n# LICENCE\n\n\t© Nadim Khemir 2023, Artistic licence 2.0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkh%2Ftcol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnkh%2Ftcol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkh%2Ftcol/lists"}