| Crates.io | beacon-calculator |
| lib.rs | beacon-calculator |
| version | 1.1.0 |
| created_at | 2024-12-22 00:25:13.946161+00 |
| updated_at | 2024-12-22 11:18:37.906729+00 |
| description | A library for calculating the glass colors needed to color a Minecraft beacon |
| homepage | |
| repository | https://github.com/Toll25/BeaconCalculator |
| max_upload_size | |
| id | 1491579 |
| size | 52,970 |
A library for finding the best approximation of a color using a Minecraft beacon.
There are already some websites that do this, like the Minecraft Wiki and Minecraft.tools. But I wanted a solution which can be automated and something that I can embed in my own website. So here it is!
Finding the best approximation of #FE2C54:
use beacon_calculator::find_combination_default;
find_combination_default([254, 44, 84]);
Returns:
Some(Panes {
panes: [
"pink",
"magenta",
"orange",
"pink",
"pink",
"red",
],
distance: 7.9557647705078125,
color: PreciseRGB {
red: 208.5,
green: 89.90625,
blue: 95.78125,
},
})
For further information check out the docs.
serde: Derives Serialize and Deserialize for custom datatypesThis project is not affiliated with, endorsed by, or associated with Microsoft or Mojang.