{"id":36418056,"url":"https://github.com/serbelga/compose-vectorize","last_synced_at":"2026-01-11T17:01:20.195Z","repository":{"id":215168599,"uuid":"737887394","full_name":"serbelga/compose-vectorize","owner":"serbelga","description":"A Kotlin Multiplatform library to generate compose.ui.graphics.vector.ImageVector from XML files","archived":false,"fork":false,"pushed_at":"2025-12-17T20:40:46.000Z","size":930,"stargazers_count":78,"open_issues_count":10,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-21T08:39:19.612Z","etag":null,"topics":["compose","compose-multiplatform","imagevector","kotlinpoet","multiplatform","vector","xml"],"latest_commit_sha":null,"homepage":"http://sergiobelda.dev/compose-vectorize/","language":"Kotlin","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/serbelga.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-01T21:15:27.000Z","updated_at":"2025-11-08T16:14:32.000Z","dependencies_parsed_at":"2024-01-03T00:10:37.096Z","dependency_job_id":"92a3f7e3-1e2e-4aa3-8dda-057f9f1087a1","html_url":"https://github.com/serbelga/compose-vectorize","commit_stats":null,"previous_names":["serbelga/compose-vectorize"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/serbelga/compose-vectorize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serbelga%2Fcompose-vectorize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serbelga%2Fcompose-vectorize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serbelga%2Fcompose-vectorize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serbelga%2Fcompose-vectorize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serbelga","download_url":"https://codeload.github.com/serbelga/compose-vectorize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serbelga%2Fcompose-vectorize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"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":["compose","compose-multiplatform","imagevector","kotlinpoet","multiplatform","vector","xml"],"created_at":"2026-01-11T17:00:43.377Z","updated_at":"2026-01-11T17:01:20.173Z","avatar_url":"https://github.com/serbelga.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compose Vectorize\n\n[![Maven Central](https://img.shields.io/maven-central/v/dev.sergiobelda.compose.vectorize/compose-vectorize-core)](https://search.maven.org/search?q=g:dev.sergiobelda.compose.vectorize)\n\nA Kotlin Multiplatform library to generate `compose.ui.graphics.vector.ImageVector` from `.xml` files. \n\nVisit the [project website](https://sergiobelda.dev/compose-vectorize/) for documentation.\n\n## Usage\n\nCreate a folder called `xml-images` in the module folder.\n\n`:module/xml-images`\n\n### Android\n\n\u003cimg width=\"332\" alt=\"Captura de pantalla 2024-01-05 a las 16 57 56\" src=\"https://github.com/serbelga/compose-vectorize/assets/26246782/97c4082a-28d8-4009-addd-427d9f893340\"\u003e\n\n### Multiplatform\n\n\u003cimg width=\"330\" alt=\"Captura de pantalla 2024-01-05 a las 17 10 28\" src=\"https://github.com/serbelga/compose-vectorize/assets/26246782/2c0a380d-2580-4898-b581-560e4b7c6e6b\"\u003e\n\n### Generate images\n\nYou can manually generate ImageVector for these XML files by calling `gradle generateImages`. This will create a Kotlin file for each XML file containing the ImageVector in the build folder.\n\n\u003cimg width=\"429\" alt=\"Captura de pantalla 2024-01-05 a las 17 00 45\" src=\"https://github.com/serbelga/compose-vectorize/assets/26246782/45ed3cd3-5773-4cf7-9474-4ef6a30a6476\"\u003e\n\u003cbr\u003e\u003c/br\u003e\n\nNow, you can use reference this image in the Compose code:\n\n```kotlin\nIcon(Images.Icons.Add, contentDescription = null)\n```\n\nNote that automatically a category called \"Icons\" has been created. A category is created for each subfolder in `xml-images` folder.\n\n-------------------\n\n## Themed Attributes\n\nIt also supports theme attributes. If you are using theme color attributes, like `?attr/colorPrimary`\nor `?attr/colorSecondary`, they can be converted to Compose `MaterialTheme` tokens, which means that\nyou can update illustration colors based on the token values. It is also compatible with Material3 dynamic colors.\n\nIt also supports theme attributes. If you are using theme color attributes, like `?attr/colorPrimary`\nor `?attr/colorSecondary`, they can be converted to Compose `MaterialTheme` tokens, which means that\nyou can update illustration colors based on the token values. It is also compatible with Material3 dynamic colors.\n\n```xml\n    \u003cpath\n        android:pathData=\"...\"\n        android:fillColor=\"?attr/colorPrimary\"/\u003e\n```\n\n\u003cdiv\u003e\n    \u003cimg width=\"220\" alt=\"Screenshot_20240310_145842\" src=\"https://github.com/serbelga/compose-vectorize/assets/26246782/73ebdb93-fbaf-454f-aaa2-bf17d9d2dff1\"\u003e\n    \u003cimg width=\"220\" alt=\"Screenshot_20240310_145842-2\" src=\"https://github.com/serbelga/compose-vectorize/assets/26246782/b282aff3-599b-4039-9455-247eed7befc2\"\u003e\n    \u003cimg width=\"220\" alt=\"Screenshot_20240310_145842-1\" src=\"https://github.com/serbelga/compose-vectorize/assets/26246782/e2a10a2e-1eb4-40af-be1e-aeaac1954f23\"\u003e\n\u003c/div\u003e\n\n\u003e [!NOTE]  \n\u003e It requires use Compose Material 3 dependency.\n\n-------------------\n\n## License\n\n```\n   Copyright 2024 Sergio Belda\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserbelga%2Fcompose-vectorize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserbelga%2Fcompose-vectorize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserbelga%2Fcompose-vectorize/lists"}