{"id":22595485,"url":"https://github.com/oovm/color-rs","last_synced_at":"2025-04-11T00:21:43.636Z","repository":{"id":57608513,"uuid":"419230398","full_name":"oovm/color-rs","owner":"oovm","description":"Compile time color literal for rust","archived":false,"fork":false,"pushed_at":"2023-06-14T06:03:10.000Z","size":290,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-10T09:40:31.538Z","etag":null,"topics":["color","compile-time","meta-programming","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oovm.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","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-10-20T07:38:12.000Z","updated_at":"2023-10-17T02:44:53.000Z","dependencies_parsed_at":"2024-12-08T10:10:22.461Z","dependency_job_id":"a948b379-8670-417f-b27a-942fb40ed9d2","html_url":"https://github.com/oovm/color-rs","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"10cd62c0a505e63749b391bf262e1d08d14ff6a4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"oovm/RustTemplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oovm%2Fcolor-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oovm%2Fcolor-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oovm%2Fcolor-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oovm%2Fcolor-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oovm","download_url":"https://codeload.github.com/oovm/color-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248157758,"owners_count":21057062,"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","compile-time","meta-programming","rust"],"created_at":"2024-12-08T10:10:18.155Z","updated_at":"2025-04-11T00:21:43.611Z","avatar_url":"https://github.com/oovm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Rust Color\n==========\n\n### Compile time color parsing\n\n\n```rust\nuse color::{rgba, RGBA};\n\n#[test]\nfn test_rgba() {\n    assert_eq!(rgba!(\"#334D6677\"), RGBA::new(51, 76, 102));\n    assert_eq!(rgba!(\"rgba(51, 77, 102, .5)\"), RGBA::new(51, 77, 102, 127));\n    assert_eq!(rgba!(\"rgba(20% 30% 40% 50%)\"), RGBA::new(51, 77, 102, 127));\n}\n```\n\n![success](https://user-images.githubusercontent.com/17541209/156918397-cf9024dc-7f2e-4f36-b3a7-2eec1cb26584.png)\n\n\n### Compile time error report\n\n```rust\n// Invalid hex pattern, can take 3,4,6,8 hex number only\nrgba!(\"#34678\");\n```\n\n\n![failure](https://user-images.githubusercontent.com/17541209/156918188-e8d6ed8c-b811-4f20-9159-040eeab5af07.png)\n\n\n### Strict check mode\n\n```toml\nfeatures = [\"strict\"]\n```\n\nNormally valid mode is looser than specified, strict mode rejects all non-css level3 input\n\n```rust\n// will not panic by default\nrgba!(\"rgba(10 10 10, 10)\");\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foovm%2Fcolor-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foovm%2Fcolor-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foovm%2Fcolor-rs/lists"}