{"id":14969561,"url":"https://github.com/asintotoo/colorlib","last_synced_at":"2025-10-26T09:30:49.363Z","repository":{"id":239786498,"uuid":"800573471","full_name":"Asintotoo/ColorLib","owner":"Asintotoo","description":"A Color API for Minecraft Spigot Plugins","archived":false,"fork":false,"pushed_at":"2024-05-16T08:01:20.000Z","size":26,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T17:14:01.124Z","etag":null,"topics":["api","color","colors","hexcode","hexcolor","java","library","message","minecraft","minecraft-api","minecraft-library","minecraft-plugin","paper-plugin","papermc","spigot","spigot-api","spigot-plugin","spigotmc"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Asintotoo.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}},"created_at":"2024-05-14T15:36:17.000Z","updated_at":"2024-05-28T15:26:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"594828d9-e6c3-4dd9-b4ea-0aca90b2bbdd","html_url":"https://github.com/Asintotoo/ColorLib","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"fcbc09503670ff34b8ff07a2ebe98e7817415176"},"previous_names":["asintotoo/colorlib"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asintotoo%2FColorLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asintotoo%2FColorLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asintotoo%2FColorLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asintotoo%2FColorLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Asintotoo","download_url":"https://codeload.github.com/Asintotoo/ColorLib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238301125,"owners_count":19449393,"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":["api","color","colors","hexcode","hexcolor","java","library","message","minecraft","minecraft-api","minecraft-library","minecraft-plugin","paper-plugin","papermc","spigot","spigot-api","spigot-plugin","spigotmc"],"created_at":"2024-09-24T13:42:02.847Z","updated_at":"2025-10-26T09:30:49.082Z","avatar_url":"https://github.com/Asintotoo.png","language":"Java","readme":"## ColorLib - A Color API for Minecraft Spigot Plugins\n\nHow to include the API with Maven\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.Asintotoo\u003c/groupId\u003e\n        \u003cartifactId\u003eColorLib\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n        \u003cscope\u003ecompile\u003c/scope\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n**Note**: ColorLib uses external Libraries that requires Shading in order to be used in your Minecraft Plugin, please include the following in your *pom.xml*\n```xml\n\u003cbuild\u003e\n        \u003cplugins\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n                \u003cartifactId\u003emaven-shade-plugin\u003c/artifactId\u003e\n                \u003cversion\u003e3.1.0\u003c/version\u003e\n                \u003cexecutions\u003e\n                    \u003cexecution\u003e\n                        \u003cphase\u003epackage\u003c/phase\u003e\n                        \u003cgoals\u003e\n                            \u003cgoal\u003eshade\u003c/goal\u003e\n                        \u003c/goals\u003e\n                    \u003c/execution\u003e\n                \u003c/executions\u003e\n            \u003c/plugin\u003e\n        \u003c/plugins\u003e\n    \u003c/build\u003e\n```\n\n# Usage\nThe Main Java method to process a String is *ColorLib.setColors(\"your message here\");*\n\nTo add a *Gradient* use the \u003cGRADIENT\u003e tag:\n```java\nColorLib.setColors(\"\u003cGRADIENT:FF0000\u003eThis is a Gradient Text\u003c/GRADIENT:00FF00\u003e\");\n```\n![image](https://github.com/Asintotoo/ColorLib/assets/166311378/25021f09-8f48-4354-8494-0d4fbbc1917a)\n\nTo add a *Rainbow* text use the \u003cRAINBOW\u003e tag:\n```java\nColorLib.setColors(\"\u003cRAINBOW:1\u003eThis is a Rainbow Text\u003c/RAINBOW\u003e\");\n```\n![image](https://github.com/Asintotoo/ColorLib/assets/166311378/53d4c569-b6bf-4e55-8dc8-b41360341852)\nThe number after RAINBOW represents the saturation\n```java\nColorLib.setColors(\"\u003cRAINBOW:50\u003eThis is a Rainbow Text\u003c/RAINBOW\u003e\");\n```\n![image](https://github.com/Asintotoo/ColorLib/assets/166311378/776687d8-4b23-40d5-9b21-b8fd80ccb98d)\n\nTo set a simple *Solid* color use the \u003cSOLID\u003e tag:\n```java\nColorLib.setColors(\"\u003cSOLID:aabbcc\u003eThis is a Solid Text\");\n```\n![image](https://github.com/Asintotoo/ColorLib/assets/166311378/0bead61c-1f73-43f5-b519-ee371aba98d1)\n\n**Note:** If your server is running a version before 1.16 the resulting color will be the nearest supported one (This also applies to gradient)\n\nNormal Chat Color Codes works too:\n```java\nColorLib.setColors(\"\u00265This is a Simple Text\");\n```\n![image](https://github.com/Asintotoo/ColorLib/assets/166311378/4a56bf6e-9fb8-4b2d-a19f-4200303060af)\n\n\n# Advanced Usage\nThe API comes with some additional method that you may want to use:\n\nGet a processed text with the addition of inserting all PlaceholderAPI's placeholders refering to a given player:\n```java\nColorLib.setColorsAndPlaceholders(Bukkit.getPlayer(\"Maggiollo\"), \"\u003cGRADIENT:FF0000\u003eCiao %player_name%\u003c/GRADIENT:0000FF\u003e\");\n```\n![image](https://github.com/Asintotoo/ColorLib/assets/166311378/0abd3564-92ef-45ee-afdb-68261ac17547)\n\nGet a processed text given a YamlConfiguration path:\n```java\nColorLib.getColoredStringFromConfig((YamlConfiguration) plugin.getConfig(), \"messages.example\");\n```\nthis will format the following text:\n```yml\nmessages:\n  example: \"\u003cSOLID:00aaff\u003eThis is an Example\"\n```\n\nGet a processed text given a YamlConfiguration path and insert all PlaceholderAPI's placeholders refering to a given player:\n```java\nColorLib.getColoredStringFromConfigWithPlaceholders((YamlConfiguration) plugin.getConfig(), Bukkit.getPlayer(\"Maggiollo\"), \"messages.example-papi\");\n```\nthis will format the following text replacing %player_name% with \"Maggiollo\":\n```yml\nmessages:\n  example-papi: \"\u003cSOLID:00aa55\u003eHello %player_name%\"\n```\n**Note**: All the method using the \"Player\" class are also compatible with the \"OfflinePlayer\" class.\n\n**Note**: All the methods that use PlaceholderAPI's Placeholders requires PlaceholderAPI to be installed on the server, you can download it from [here](https://www.spigotmc.org/resources/placeholderapi.6245/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasintotoo%2Fcolorlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasintotoo%2Fcolorlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasintotoo%2Fcolorlib/lists"}