{"id":43216550,"url":"https://github.com/mazznoer/csscolorparser-rs","last_synced_at":"2026-02-01T08:09:42.966Z","repository":{"id":40328836,"uuid":"321112943","full_name":"mazznoer/csscolorparser-rs","owner":"mazznoer","description":"Rust CSS color parser library","archived":false,"fork":false,"pushed_at":"2026-01-31T10:29:31.000Z","size":278,"stargazers_count":75,"open_issues_count":5,"forks_count":11,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-31T22:54:40.861Z","etag":null,"topics":["color","colour","css","parser"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mazznoer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"mazznoer","ko_fi":"mazznoer","liberapay":"mazznoer","custom":"https://paypal.me/mazznoer"}},"created_at":"2020-12-13T16:49:18.000Z","updated_at":"2026-01-31T10:29:34.000Z","dependencies_parsed_at":"2025-05-15T19:26:19.506Z","dependency_job_id":"7a564de3-498a-43ae-b0b8-63b92ca695ef","html_url":"https://github.com/mazznoer/csscolorparser-rs","commit_stats":{"total_commits":88,"total_committers":7,"mean_commits":"12.571428571428571","dds":"0.13636363636363635","last_synced_commit":"042a63a580d38611b1ed435de429b064b6aab67c"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/mazznoer/csscolorparser-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazznoer%2Fcsscolorparser-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazznoer%2Fcsscolorparser-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazznoer%2Fcsscolorparser-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazznoer%2Fcsscolorparser-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mazznoer","download_url":"https://codeload.github.com/mazznoer/csscolorparser-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazznoer%2Fcsscolorparser-rs/sbom","scorecard":{"id":630652,"data":{"date":"2025-08-11","repo":{"name":"github.com/mazznoer/csscolorparser-rs","commit":"6350f6fc54a14f7bfe95510377f293fba12477e5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/mazznoer/csscolorparser-rs/rust.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/rust.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/mazznoer/csscolorparser-rs/rust.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/rust.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":10,"reason":"21 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T07:49:33.215Z","repository_id":40328836,"created_at":"2025-08-21T07:49:33.215Z","updated_at":"2025-08-21T07:49:33.215Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28973265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T06:46:42.625Z","status":"ssl_error","status_checked_at":"2026-02-01T06:44:56.173Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["color","colour","css","parser"],"created_at":"2026-02-01T08:09:42.511Z","updated_at":"2026-02-01T08:09:42.958Z","avatar_url":"https://github.com/mazznoer.png","language":"Rust","funding_links":["https://github.com/sponsors/mazznoer","https://ko-fi.com/mazznoer","https://liberapay.com/mazznoer","https://paypal.me/mazznoer"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cstrong\u003eRust CSS Color Parser Library\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/mazznoer/csscolorparser-rs\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/crates/l/csscolorparser\"\u003e\u003c/a\u003e\n\u003ca href=\"https://crates.io/crates/csscolorparser\"\u003e\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/csscolorparser.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://docs.rs/csscolorparser\"\u003e\u003cimg alt=\"Documentation\" src=\"https://docs.rs/csscolorparser/badge.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/mazznoer/csscolorparser-rs/actions\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/mazznoer/csscolorparser-rs/actions/workflows/rust.yml/badge.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://crates.io/crates/csscolorparser\"\u003e\u003cimg alt=\"Total Downloads\" src=\"https://img.shields.io/crates/d/csscolorparser.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003e\n        \u003ca href=\"https://docs.rs/csscolorparser\"\u003eDocumentation\u003c/a\u003e • \u003ca href=\"CHANGELOG.md\"\u003eChangelog\u003c/a\u003e • \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e\n    \u003c/strong\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n[Rust](https://www.rust-lang.org/) library for parsing CSS color string as defined in the W3C's [CSS Color Module Level 4](https://www.w3.org/TR/css-color-4/).\n\n## Supported Color Format\n\n### Absolute Color\n\n* [Named colors](https://www.w3.org/TR/css-color-4/#named-colors)\n* RGB hexadecimal (with and without `#` prefix)\n     + Short format `#rgb`\n     + Short format with alpha `#rgba`\n     + Long format `#rrggbb`\n     + Long format with alpha `#rrggbbaa`\n* `rgb()` and `rgba()`\n* `hsl()` and `hsla()`\n* `hwb()`\n* `lab()`\n* `lch()`\n* `oklab()`\n* `oklch()`\n* `hwba()`, `hsv()`, `hsva()` - not in CSS standard.\n\n### Relative Color\n\nExample:\n\n```text\nrgb(from red r g calc(b + 20))\nrgb(from gold calc(((r + g) + b) / 3) 127 127)\nhwb(from #bad455 calc(h + 35) w b)\nhsl(from purple h s l / 0.5)\n```\n\n#### Relative Color Format Limitations\n\nDoesn't support percentage.\n\n`calc()` only support the following expression:\n\n```[OPERAND] [OPERATOR] [OPERAND]```\n\n`OPERAND` can be a number, a variable (`r`, `g`, `b`, `alpha` etc. depends on color function) or another expression wrapped in parenthesis.\n`OPERATOR` is one of `+`, `-`, `*` or `/`.\n\n##### Not Supported\n\n```\nrgb(from #bad455 100% g b)\nrgb(from #bad455 r g b / 50%)\nrgb(from #bad455 calc(r+g-30) 90 b)\n```\n\n##### OK\n\n```\nrgb(from #bad455 255 g b)\nrgb(from #bad455 r g b / 0.5)\nrgb(from #bad455 calc(r+15) 90 b)\nrgb(from #bad455 calc((r+g)-30) 90 b)\nhwb(from rgb(from rgb(100% 0% 50%) r g 75) calc(h+25) w b)\n```\n\n## Usage\n\nAdd this to your `Cargo.toml`\n\n```toml\ncsscolorparser = \"0.8\"\n```\n\n## Examples\n\nUsing `csscolorparser::parse()` function.\n\n```rust\nlet c = csscolorparser::parse(\"rgb(100%,0%,0%)\")?;\n\nassert_eq!(c.to_array(), [1.0, 0.0, 0.0, 1.0]);\nassert_eq!(c.to_rgba8(), [255, 0, 0, 255]);\nassert_eq!(c.to_css_hex(), \"#ff0000\");\nassert_eq!(c.to_css_rgb(), \"rgb(255 0 0)\");\nassert_eq!(c.name(), Some(\"red\"));\n```\n\nUsing `parse()` method on `\u0026str`.\n\n```rust\nuse csscolorparser::Color;\n\nlet c: Color = \"#ff00007f\".parse()?;\n\nassert_eq!(c.to_rgba8(), [255, 0, 0, 127]);\nassert_eq!(c.to_css_hex(), \"#ff00007f\");\n```\n\n## Features\n\n### Default\n\n* __std__: Using the standard library.\n* __named-colors__: Enables parsing from [named colors](https://www.w3.org/TR/css-color-4/#named-colors).\n\nDefault features can be disabled using `default-features = false`.\n\n### Optional\n\n* __rust-rgb__: Enables converting from [`rgb`](https://crates.io/crates/rgb) crate types into `Color`.\n* __cint__: Enables converting [`cint`](https://crates.io/crates/cint) crate types to and from `Color`.\n* __serde__: Enables serializing (into HEX string) and deserializing (from any supported string color format) using [`serde`](https://serde.rs/) framework.\n\n## Similar Projects\n\n* [csscolorparser](https://github.com/mazznoer/csscolorparser) (Go)\n* [csscolorparser](https://github.com/deanm/css-color-parser-js) (Javascript)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazznoer%2Fcsscolorparser-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazznoer%2Fcsscolorparser-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazznoer%2Fcsscolorparser-rs/lists"}