beacon-calculator

Crates.iobeacon-calculator
lib.rsbeacon-calculator
version1.1.0
created_at2024-12-22 00:25:13.946161+00
updated_at2024-12-22 11:18:37.906729+00
descriptionA library for calculating the glass colors needed to color a Minecraft beacon
homepage
repositoryhttps://github.com/Toll25/BeaconCalculator
max_upload_size
id1491579
size52,970
Toll (Toll25)

documentation

README

BeaconCalculator

A library for finding the best approximation of a color using a Minecraft beacon.

But why?

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!

Quick example

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.

Optional Features

  • serde: Derives Serialize and Deserialize for custom datatypes

Disclaimer

This project is not affiliated with, endorsed by, or associated with Microsoft or Mojang.

Commit count: 10

cargo fmt