How ColorDice fairness works

ColorDice generates color dice results with Web Crypto, stores each roll under a public Game ID, and signs the stored record with server-side HMAC-SHA-256.

Quick answer: the proof page lets viewers compare the recorded colors, dice count, timestamp, and signature status with the livestream result. It proves that the stored server record still matches the server signature; it is not a “trustless” system where users can recompute the private signature themselves.

How to verify

  1. Find the Game ID shown on the livestream.
  2. Open the verification link on your own device.
  3. Compare the colors, dice count, and roll time.

How colors are generated

Each roll uses random bytes from crypto.getRandomValues(). Since 256 is not evenly divisible by 6, ColorDice rejects bytes 252, 253, 254, and 255. It maps only values 0–251 to the six colors with % 6, so each color has the same theoretical probability: 1/6.

ItemValue
Random sourceWeb Crypto crypto.getRandomValues()
Default colorsRed, orange, yellow, green, blue, purple
Roll size1 to 100 dice
Verification statusStored record compared with server signature

What ColorDice stores

ColorDice stores the Game ID, dice count, color sequence, roll time, and server signature. Public recent-roll lists do not show IP addresses, device data, or user identity.

Clear limits

Viewers can check the public record, but they cannot independently recompute the HMAC without the server secret. Local history and color statistics are informational only; they do not rebalance or influence the next roll.

References

Last reviewed: 2026-06-30. Latest change: color mapping updated to remove modulo bias.

Useful links

Open ColorDice · Tiếng Việt