{"id":13643006,"url":"https://github.com/mathiazhagan01/DrawableColorChange","last_synced_at":"2025-04-20T21:32:29.502Z","repository":{"id":169220442,"uuid":"68503388","full_name":"mathiazhagan01/DrawableColorChange","owner":"mathiazhagan01","description":"Android Library to dynamically change color of drawable.","archived":false,"fork":false,"pushed_at":"2020-08-16T19:23:11.000Z","size":243,"stargazers_count":98,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T14:40:30.116Z","etag":null,"topics":["android-library","bitmap","color","drawable","dynamic","gradle","icons","imageview","jitpack"],"latest_commit_sha":null,"homepage":"","language":"Java","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/mathiazhagan01.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":"2016-09-18T07:07:00.000Z","updated_at":"2024-08-27T14:43:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"da5ba523-e2a3-47c3-ab25-7b9a984beb2b","html_url":"https://github.com/mathiazhagan01/DrawableColorChange","commit_stats":null,"previous_names":["mathiazhagan01/drawablecolorchange"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathiazhagan01%2FDrawableColorChange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathiazhagan01%2FDrawableColorChange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathiazhagan01%2FDrawableColorChange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathiazhagan01%2FDrawableColorChange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathiazhagan01","download_url":"https://codeload.github.com/mathiazhagan01/DrawableColorChange/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249965547,"owners_count":21352925,"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":["android-library","bitmap","color","drawable","dynamic","gradle","icons","imageview","jitpack"],"created_at":"2024-08-02T01:01:39.444Z","updated_at":"2025-04-20T21:32:29.234Z","avatar_url":"https://github.com/mathiazhagan01.png","language":"Java","readme":"# DrawableColorChange\nAndroid Library to dynamically change color of drawable. \n\n[![](https://jitpack.io/v/mathiazhagan01/DrawableColorChange.svg)](https://jitpack.io/#mathiazhagan01/DrawableColorChange)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DrawableColorChange-blue.svg?style=flat-square)](http://android-arsenal.com/details/3/4353) \n\u003ca href=\"http://www.methodscount.com/?lib=com.github.mathiazhagan01%3ADrawableColorChange%3A1.4\"\u003e\u003cimg src=\"https://img.shields.io/badge/Methods and size-core: 37 | deps: 19163 | 18 KB-e91e63.svg\"/\u003e\u003c/a\u003e\n[![Codix](https://codix.io/gh/badge/mathiazhagan01/DrawableColorChange)](https://codix.io/gh/repo/mathiazhagan01/DrawableColorChange)\n\nIf you like the library, please rate us on \u003ca href=\"https://codix.io/gh/repo/mathiazhagan01/DrawableColorChange\"\u003ecodix.io!\u003c/a\u003e\n\n### Gradle\n\n#### Step 1. Add the JitPack repository to your build file\n  Add it in your root build.gradle at the end of repositories:\n  \n``` gradle\n    \tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url \"https://jitpack.io\" }\n\t\t  }\n\t}\n```\n\n#### Step 2. Add the dependency\n\n``` gradle\n    \tdependencies {\n\t        compile 'com.github.mathiazhagan01:DrawableColorChange:1.4'\n\t}\n```\n\n### Maven\n\n#### Step 1. Add the JitPack repository to your build file\n\n``` xml\n    \t\u003crepositories\u003e\n\t\t  \u003crepository\u003e\n\t\t      \u003cid\u003ejitpack.io\u003c/id\u003e\n\t\t      \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\t\t  \u003c/repository\u003e\n\t\u003c/repositories\u003e\n```\n\t\n#### Step 2. Add the dependency\n\t\n``` xml\n\t  \u003cdependency\u003e\n\t      \u003cgroupId\u003ecom.github.mathiazhagan01\u003c/groupId\u003e\n\t      \u003cartifactId\u003eDrawableColorChange\u003c/artifactId\u003e\n\t      \u003cversion\u003e1.4\u003c/version\u003e\n\t  \u003c/dependency\u003e\n```\n\n### Before changing color\n\n![Screenshot](./before.png)\n\n### After changing color\n\n![Screenshot](./after.png)\n\n### Example 1\n  \n``` java\n  \tDrawableColorChange drawableColorChange = new DrawableColorChange(this);\t\n  \n  \tdrawableColorChange.setDrawable(R.drawable.icon);\n  \tdrawableColorChange.setColorResId(R.color.colorAccent);\n  \tDrawable drawable = drawableColorChange.getColorChangedDrawable();\n  \tImageView imageView = (ImageView) findViewById(R.id.image);\n  \timageView.setImageDrawable(drawable);\n```\n  \n### Example 2\n  \n``` java\n  \timageView.setImageDrawable(drawableColorChange.changeColorById(R.drawable.icon, R.color.colorAccent));\n```\n\n### Example 3\n\n``` java\n  \tdrawableColorChange.setDrawable(R.drawable.icon);\n\tdrawableColorChange.setColorResId(R.color.colorAccent);\n\tBitmap bitmap = drawableColorChange.getColorChangedBitmap();\n\timageView.setImageBitmap(bitmap);\n```\n\t\n### LICENSE\n\n\tDrawableColorChange library for Android\n\tCopyright (c) 2017 Mathiazhagan Dinesh (http://github.com/mathiazhagan01).\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\thttp://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n","funding_links":[],"categories":["Color"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathiazhagan01%2FDrawableColorChange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathiazhagan01%2FDrawableColorChange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathiazhagan01%2FDrawableColorChange/lists"}