{"id":17126137,"url":"https://github.com/stoyan/csscolormin","last_synced_at":"2025-04-13T06:27:41.448Z","repository":{"id":66662448,"uuid":"20789789","full_name":"stoyan/csscolormin","owner":"stoyan","description":"CSS color minification module","archived":false,"fork":false,"pushed_at":"2019-02-05T22:03:01.000Z","size":83,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T17:05:14.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/stoyan.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}},"created_at":"2014-06-13T02:33:06.000Z","updated_at":"2025-03-29T06:34:35.000Z","dependencies_parsed_at":"2023-02-21T12:15:30.369Z","dependency_job_id":null,"html_url":"https://github.com/stoyan/csscolormin","commit_stats":{"total_commits":11,"total_committers":3,"mean_commits":"3.6666666666666665","dds":"0.18181818181818177","last_synced_commit":"4ccb09ceddd01078101b0cb87881e45741e6b5f6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoyan%2Fcsscolormin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoyan%2Fcsscolormin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoyan%2Fcsscolormin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoyan%2Fcsscolormin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stoyan","download_url":"https://codeload.github.com/stoyan/csscolormin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248673384,"owners_count":21143490,"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":[],"created_at":"2024-10-14T18:46:54.524Z","updated_at":"2025-04-13T06:27:41.420Z","avatar_url":"https://github.com/stoyan.png","language":"JavaScript","readme":"Utility that minifies CSS colors\n\n## Why\n\nCause we're counting bytes here!\n\n## What\n\nThis little module uses the `color` npm module to do the heavy lifting.\n\nSo it will take any string input like `\"white\"`, `\"rgba(0,0,0,1)\"`, `\"hsla(..)\"`, `\"hsv()\"`, `\"cmyk()\"`, etc\n\nThen it converts to `rgba()`, because we're targeting browsers.\n\nThen it tries to minify the result as best as possible, e.g. removes the `a` in `rgba` if not needed,\ntries an `#rrggbb`, an `#rgb` or a color name (e.g. `red`) and returns the shortest.\n\nThe return values are also consistently lowercase.\n\n## Installation\n\n    $ npm install csscolormin\n\n## Usage\n\nThere's a single function provided by the module. It accepts any type of input that `color` module accepts, \nplus an rgb/rgba array.\n\nExamples:\n\n```js\nconst min = require('csscolormin');\nmin(\"white\");\nmin(\"rgb(0, 0, 0)\");\nmin(\"rgba(0, 0, 0, 0)\");\nmin(\"hsl(0, 0, 0)\");\nmin(\"hsla(0, 0, 0, 0)\");\nmin(\"#bbaadd\");\n```\n\nSome more examples and returned values:\n\n```js\nmin(\"white\"); // \"#fff\"\nmin(\"black\"); // \"#000\"\nmin(\"fuchsia\"); // \"#f0f\"\nmin(\"red\"); // \"red\"\nmin(\"#333333\"); // \"#333\"\nmin(\"rgb(10, 30, 25)\"); // \"#0a1e19\"\nmin(\"rgba(10, 30, 25, 1)\"); // \"#0a1e19\"\nmin(\"rgba(10, 30, 25, 0.1)\"); // \"rgba(10,30,25,.1)\"\nmin(\"rgba(10, 30, 25, 0)\"); // \"transparent\"\nmin(\"hsl(120, 50%, 60%)\"); // \"#6c6\"\nmin(\"blue\"); // \"blue\"\nmin(\"goldenrod\"); // \"#daa520\"\n```\n\n## More\n\n * Playground: http://colormin.csspatterns.com\n * The `color` module: https://github.com/harthur/color","funding_links":[],"categories":["Miscellaneous"],"sub_categories":["Meetups"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoyan%2Fcsscolormin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstoyan%2Fcsscolormin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoyan%2Fcsscolormin/lists"}