beacon-calculator 1.0.0

A library for calculating the glass colors needed to color a Minecraft beacon
Documentation
  • Coverage
  • 81.82%
    9 out of 11 items documented1 out of 7 items with examples
  • Size
  • Source code size: 50.52 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 888.05 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Toll25/BeaconCalculator
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Toll25

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.

Disclaimer

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