{"id":17041278,"url":"https://github.com/5sw/makecolors","last_synced_at":"2026-04-17T03:03:31.695Z","repository":{"id":55444512,"uuid":"325513256","full_name":"5sw/MakeColors","owner":"5sw","description":"Converts a simple list of color definitions to asset catalogs for Xcode and resource XML for Android","archived":false,"fork":false,"pushed_at":"2022-10-08T11:14:24.000Z","size":158,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T00:47:17.938Z","etag":null,"topics":["android","assetcatalog","color","hacktoberfest","ios","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/5sw.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}},"created_at":"2020-12-30T09:50:32.000Z","updated_at":"2022-10-08T08:03:37.000Z","dependencies_parsed_at":"2023-01-19T16:03:28.771Z","dependency_job_id":null,"html_url":"https://github.com/5sw/MakeColors","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/5sw/MakeColors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5sw%2FMakeColors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5sw%2FMakeColors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5sw%2FMakeColors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5sw%2FMakeColors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5sw","download_url":"https://codeload.github.com/5sw/MakeColors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5sw%2FMakeColors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31913078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["android","assetcatalog","color","hacktoberfest","ios","xcode"],"created_at":"2024-10-14T09:11:57.826Z","updated_at":"2026-04-17T03:03:31.684Z","avatar_url":"https://github.com/5sw.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MakeColors\n\nConverts a simple list of color definitions to asset catalogs for Xcode, resource XML for Android or an HTML preview.\n\n## Installation\n\nInstall via [Homebrew](https://brew.sh):\n\n```\nbrew tap 5sw/makecolors\nbrew install make-colors\n```\n\nIf you don’t use Homebrew you can also install directly from source. Clone the repository or download the release and run `make install` inside the working copy.\n\n## Usage\n\n```\nUSAGE: make-colors \u003cinput\u003e [--ios] [--android] [--html] [--prefix \u003cprefix\u003e] [--output \u003coutput\u003e] [--dump]\n\nARGUMENTS:\n  \u003cinput\u003e                 The color list to process. \n        Use - to process the standard input.\n\nOPTIONS:\n  --ios/--android/--html  The formatter to use. (default: ios)\n  --prefix \u003cprefix\u003e       Prefix for color names. \n  --output \u003coutput\u003e       Output file to write. \n        Use - for standard output.\n        Default is the input file name with the appropriate file extension. If\n        the input is - the default is standard output.\n        Note that asset catalogs cannot be written to standard output.\n  --dump                  List read colors on console. \n  -h, --help              Show help information.\n```\n\n## Input format\n\nEach line in your input contains one color definition. That is a name followed by the actual color. We support RGB colors in a few formats similar to CSS:\n\n```\nBase/Green #8fd151\nBase/PaleGreen #d0f9a9\nBase/Red rgb(249, 39, 7)\nTransparentRed rgba(255, 0, 0, 128)\nBase/Yellow #ff0\n```\n\nGrayscale colors can be produced with the `white(value)` and `white(value, alpha)` syntax. A value of zero means black while a value of 255 is pure white. \n\n```\nBlack white(0)\nMediumGray white(128)\nTransparentGray white(128, 128)\n```\n\nHSV colors can be specified as `hsv(hue, saturation, value)` or `hsva(hue, saturation, value, alpha)` syntax. Hue is specified as degrees with the `°` or `deg` suffix.\n\n```\nHSV/Yellow hsv(60°, 255, 255)\n```\n\nColors can also reference other colors by prefixing them with an `@` sign:\n\n```\nError @Base/Red\nWarning @Base/Yellow\nGood @Base/Green\n```\n\n## Output format\n\n### Xcode Asset Catalogs (`--ios`)\n\nThe optional prefix followed by a `/` is added in front of the color name. Then for each part separate by / a new folder that provides namespace is inserted in the asset catalogs. Spaces are inserted between CamelCase words. Color references are inserted as copies of the original color.\n\nFor the given example input the generated asset catalog looks like this: \n\n![](Docs/assetcatalog.png)\n\n### Android resource XML (`--android`)\n\nThe optional prefix, followed by a underscore is added in front of the name. Names are converted from CamelCase to snake_case and / is replaced by underscores as well. Color references the generated color resource also references the original color.\n\nThe generated XML for the example input looks like this:\n\n```\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cresources\u003e\n    \u003ccolor name=\"base_green\"\u003e#8FD151\u003c/color\u003e\n    \u003ccolor name=\"base_pale_green\"\u003e#D0F9A9\u003c/color\u003e\n    \u003ccolor name=\"base_red\"\u003e#F92707\u003c/color\u003e\n    \u003ccolor name=\"base_yellow\"\u003e#FFFF00\u003c/color\u003e\n    \u003ccolor name=\"transparent_red\"\u003e#FF000080\u003c/color\u003e\n    \u003ccolor name=\"error\"\u003e@color/base_red\u003c/color\u003e\n    \u003ccolor name=\"good\"\u003e@color/base_green\u003c/color\u003e\n    \u003ccolor name=\"warning\"\u003e@color/base_yellow\u003c/color\u003e\n\u003c/resources\u003e\n\u003c/xml\u003e\n```\n\n### HTML preview (`--html`)\n\nGenerates a simple HTML table with the color names, values and a sample.\n\nThe generated HTML looks like this:\n\n![](Docs/html.png)\n\n## Future work\n\n- Calculate derived colors (blend, change hue/saturation/brightness/alpha)\n- Support for dark/light mode\n- Improved error reporting in the parser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5sw%2Fmakecolors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5sw%2Fmakecolors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5sw%2Fmakecolors/lists"}