{"id":21597461,"url":"https://github.com/cerus/minecraft-map-colors","last_synced_at":"2025-10-14T07:16:50.511Z","repository":{"id":115796330,"uuid":"506819299","full_name":"cerus/minecraft-map-colors","owner":"cerus","description":"A list of all available Minecraft map colors for each version between 1.8.3 and 1.21.8","archived":false,"fork":false,"pushed_at":"2025-09-07T15:10:58.000Z","size":74,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T17:26:47.451Z","etag":null,"topics":["minecraft","minecraft-mappings","minecraft-maps","minecraft-protocol","protocol"],"latest_commit_sha":null,"homepage":"","language":null,"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/cerus.png","metadata":{"files":{"readme":"README.md","changelog":"changes.md","contributing":null,"funding":".github/funding.yml","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},"funding":{"github":["cerus"]}},"created_at":"2022-06-23T23:26:27.000Z","updated_at":"2025-09-07T15:11:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"55903c28-38dd-471d-878c-41a8b6c71368","html_url":"https://github.com/cerus/minecraft-map-colors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cerus/minecraft-map-colors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerus%2Fminecraft-map-colors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerus%2Fminecraft-map-colors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerus%2Fminecraft-map-colors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerus%2Fminecraft-map-colors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cerus","download_url":"https://codeload.github.com/cerus/minecraft-map-colors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerus%2Fminecraft-map-colors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018217,"owners_count":26086303,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["minecraft","minecraft-mappings","minecraft-maps","minecraft-protocol","protocol"],"created_at":"2024-11-24T18:09:03.737Z","updated_at":"2025-10-14T07:16:50.506Z","avatar_url":"https://github.com/cerus.png","language":null,"funding_links":["https://github.com/sponsors/cerus"],"categories":[],"sub_categories":[],"readme":"# Minecraft map colors\n\nThis repository contains a list of all available map colors for each version between 1.8.3 and 1.21.8. The colors were fetched by a script that pulled\nthe Spigot source code for each version and scanned the MaterialMapColor.java class.\n\n[Click me to go to the color index](index.md)\n\n[Click me to view the changes between the versions](changes.md)\n\n## Why did you make this repository?\n\nI work a lot with maps and figuring out which colors work for a specific Minecraft version has always been a time-consuming process for me. That's why\nI decided to make this repository.\n\n## Contents\n\n- `index.md`: An index for each version stored in this repository\n- `versions/`: The directory that contains the versions\n- `mappings.json`: All of the colors in a convenient json file\n- `mappings_min.json`: Same as above but in a way smaller format\n\n## mappings.json\n\nMappings format:\n\n```json5\n// Root\n{\n  // Version item\n  \"1.8.8\": {\n    // Color item\n    // Color 0 and all of its variants is always completely transparent.\n    \"0\": {\n      // The base color\n      base: 0,\n      // The variants of this color\n      colors: [\n        0,\n        0,\n        0,\n        0\n      ]\n    },\n    // Another color item\n    \"1\": {\n      // The base color\n      \"base\": 8368696,\n      // The variants of this color\n      \"colors\": [\n        5864743,\n        7182640,\n        8368696,\n        4415005\n      ]\n    },\n    // ...more colors\n  },\n  // ...more versions\n}\n```\n\nExample: Reading the mappings in Java with Gson\n\n```java\nimport com.google.gson.JsonArray;\nimport com.google.gson.JsonObject;\nimport com.google.gson.JsonParser;\nimport java.awt.Color;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass MyClass {\n\n    public static void main(String[] args) {\n        // Load the mappings\n        File mappingsFile = new File(\"./mappings.json\");\n        JsonObject obj;\n        try (FileInputStream in = new FileInputStream(mappingsFile);\n             InputStreamReader reader = new InputStreamReader(in)) {\n            obj = JsonParser.parseReader(reader).getAsJsonObject();\n        } catch (IOException ex) {\n            throw new RuntimeException(ex);\n        }\n\n        // Get the colors of MC 1.16.5\n        final JsonObject version = obj.get(\"1.16.5\").getAsJsonObject();\n        // Loop through the colors of MC 1.16.5\n        for (String key : version.keySet()) {\n            final JsonObject colorObj = version.get(key).getAsJsonObject();\n            final JsonArray colorArr = colorObj.get(\"colors\").getAsJsonArray();\n            // The key is always the color id\n            int id = Integer.parseInt(key);\n            for (int variant = 0; variant \u003c colorArr.size(); variant++) {\n                // Get the color and deserialize it with java.awt.Color\n                int rgb = colorArr.get(variant).getAsInt();\n                final Color color = new Color(rgb, false /*\u003c- Important!*/);\n                // id * 4 + variant = Protocol ID\n                System.out.printf(\"%d = rgb(%d, %d, %d)%n\", id * 4 + variant, color.getRed(), color.getGreen(), color.getBlue());\n\n                // Output:\n                // 0 = rgb(0, 0, 0)\n                // 1 = rgb(0, 0, 0)\n                // 2 = rgb(0, 0, 0)\n                // 3 = rgb(0, 0, 0)\n                // 4 = rgb(89, 125, 39)\n                // 5 = rgb(109, 153, 48)\n                // 6 = rgb(127, 178, 56)\n                // 7 = rgb(67, 94, 29)\n                // ...\n            }\n        }\n    }\n}\n```\n\n## mappings_min.json\n\nThe basic format is the same as in mappings.json. The only difference is that colors that have not changed have not been recorded in the file.\n\n## Enjoy my work?\n\n[:heart: Sponsor me on GitHub](https://github.com/sponsors/cerus)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerus%2Fminecraft-map-colors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcerus%2Fminecraft-map-colors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerus%2Fminecraft-map-colors/lists"}