{"id":13897320,"url":"https://github.com/doczi-dominik/colorlist","last_synced_at":"2026-05-04T17:34:27.435Z","repository":{"id":191862983,"uuid":"281717150","full_name":"doczi-dominik/colorlist","owner":"doczi-dominik","description":"Extract and display colors","archived":false,"fork":false,"pushed_at":"2020-07-26T10:47:21.000Z","size":2189,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T05:15:04.794Z","etag":null,"topics":["cli","colors","command-line","commandline","dotfiles","dotfiles-linux","hex","linux","python","python3","rice","ricing","unix"],"latest_commit_sha":null,"homepage":"","language":"Python","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/doczi-dominik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-07-22T15:38:51.000Z","updated_at":"2022-03-17T17:44:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad610c5e-a19b-45db-988e-5467a5eb9bae","html_url":"https://github.com/doczi-dominik/colorlist","commit_stats":null,"previous_names":["doczi-dominik/colorlist"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/doczi-dominik/colorlist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doczi-dominik%2Fcolorlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doczi-dominik%2Fcolorlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doczi-dominik%2Fcolorlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doczi-dominik%2Fcolorlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doczi-dominik","download_url":"https://codeload.github.com/doczi-dominik/colorlist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doczi-dominik%2Fcolorlist/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27359238,"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","status":"online","status_checked_at":"2025-11-29T02:00:06.589Z","response_time":56,"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":["cli","colors","command-line","commandline","dotfiles","dotfiles-linux","hex","linux","python","python3","rice","ricing","unix"],"created_at":"2024-08-06T18:03:30.998Z","updated_at":"2025-11-29T17:04:52.923Z","avatar_url":"https://github.com/doczi-dominik.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Colorlist\nExtract and display colors conveniently!\n\n![](demo.gif)\n\n## Contents\n\n#### 1. [Features](#features)\n#### 2. [Installation](#installation)\n#### 3. [Usage](#usage)\n#### 4. [Customization](#customization)\n\n## Features\n\n\u0026#x2714; **Portable** - The only dependencies are *Python 3*, and a \\*nix based system!\n\n\u0026#x1f527; **Customizable** - Specify multiple color formats, customize the output with *templates*, and more!\n\n\u0026#x1f91d; **Versatile** - The use of standard streams, file and tab-delimited text output makes it pleasing to manipulate `colorlist` in a terminal.\n\n## Installation\n\n1. Clone this repository to a convenient place:\n```bash\n$ git clone https://github.com/doczi-dominik/colorlist\n```\n\n2. (Optional) Alias `colorlist.py` for even easier access!\n```bash\n# In ~/.bashrc\nalias colorlist='/path/to/colorlist/colorlist.py'\n```\nYou can also make some options *'default'* this way.\n\n## Usage\n\n##### `colorlist` parses colors in a provided format *(#RRGGBB by default)*, creates a HTML document out of them, and opens the file in a program. *(`$BROWSER` by default)*\n\n### Basic usage\n\n#### Passing plaintext\n\n```bash\n$ colorlist.py \"#ff00ff anything can be written between the colors #C0FFEE\"\n```\n\n#### Passing a file path - the best application for Colorlist!\n```bash\n$ colorlist.py ~/.config/rofi/colors.rasi\n```\n\n#### Passing `-` (or nothing) for reading `STDIN` - useful for file manipulation beforehand!\n```bash\n$ head -n 5 ~/.cache/wal/colors | colorlist.py\n\n# same as: head -n 5 ~/.cache/wal/colors | colorlist.py -\n```\n\n### Formats\n\nYou can specify alternate color formats using the `-f` / `--format` flags. Formats use placeholder letters which are used to identify the corresponding part, the rest are only used for matching:\n- `R, G, B, A`: A single hexadecimal **digit**\n- `r, g, b, a`: A single decimal **number**\n\nNotes:\n- Using `a` and `A` is optional. \n- A format must contain at least one of `R, G, B` or `r, g, b`. \n- Hex and decimal placeholders cannot be mixed.\n- Placeholders can be used as regular characters by escaping them.\n\nExamples:\n- `#RRGGBB`: Hexadecimal numbers (default)\n- `r, g, b`: Comma-separated RGB values\n- `\\r\\g\\b\\a(r,g,b,a)`: Matches the CSS `rgba()` function\n- `#RGB`: Short hexadecimal notation\n- `#GGAARRBB`: Whatever abomination this is - but it's still valid!\n\n### Alternate output modes\n\n#### Program output\nBy default, `colorlist` will open a generated HTML doc in the program defined in the `$BROWSER` environment variable by passing it to `$1`. The program can be specified manually by using the `-p` / `--program` flag. Additional arguments to the program can also be specified with `-ab` / `--args-before` and `-aa` / `--args-after`, which are relative to `$1`.\n\n```bash\n$ colorlist.py -p firefox -aa \"~/colors.txt\" -ab \"--new-window\" ~/colors.txt\n\n# Assembled command: firefox --new-window /tmp/colorlist_colors.txt_XxxXXx ~/colors.txt\n#                    [ -p  ] [ -ab      ] [ generated HTML               ] [ -aa      ]\n```\n\n#### File output\nIf you want, you can save the generated HTML file instead of opening it by using `-o` / `--out` and passing a filename. Passing `\"-\"` as the filename will print the contents to `STDOUT`.\n\n```bash\n$ colorlist.py ~/.cache/wal/colors -o asd.html\n$ colorlist.py ~/.cache/wal/colors -o - | head -n 2\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n```\n\n#### Text output\n`colorlist` can also provide output in the terminal by passing the `-s` / `--stdout` flag. The output is tab-delimited for easy use with tools like `cut`, and is categorised by the formats provided.\n\n```bash\n$ colorlist.py -s \"#c0ffee #556677 #FF00aa\"\n#RRGGBB\n-------\n#556677\trgba:85,102,119,255\thex:#556677\thsv:210,28.57,46.67\tlum:0.39\n#FF00aa\trgba:255,0,170,255\thex:#FF00AA\thsv:320,100.0,100.0\tlum:0.37\n#c0ffee\trgba:192,255,238,255\thex:#C0FFEE\thsv:164,24.71,100.0\tlum:0.91\n```\n\n## Customization\n\n### HTML templates\nYou can customize the way the HTML output looks by customizing the default template, or by creating a new one!\n\nTemplates can be found inside the template directory. Each template has two files in it: `page.html` and `color.html`. Templates work like formats, using placeholder values to search and replace with information.\n\n`page.html` placeholders:\n- `[list]`: The point where the colors will be inserted into the file.\n\n`color.html` placeholders:\n- `[string]`: The color as it was found in the source\n- `[hex]`: Hex representation of the color\n- `[lum]`: The luminance of the color\n- `[fgcol]`: White for darker colors, black for brighter ones\n- `[bgcol]`: Black for darker colors, white for brighter ones\n- `[r]`: Decimal representation of R\n- `[g]`: Decimal representation of G\n- `[b]`: Decimal representation of B\n- `[a]`: Decimal representation of A\n- `[h]`: Decimal representation of H (hue)\n- `[s]`: Decimal representation of S (saturation)\n- `[v]`: Decimal representation of V (value)\n\nThe template to be used can be specified with `-t [TEMPLATE-NAME]` / `--template [TEMPLATE-NAME]` when running `colorlist`.\n\n### Take a look at the default template for examples!\n\n# Pull requests and suggestions welcome! \u0026#x1f642;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoczi-dominik%2Fcolorlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoczi-dominik%2Fcolorlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoczi-dominik%2Fcolorlist/lists"}