From f39b334457516673d261b7f28731980bfcb60869 Mon Sep 17 00:00:00 2001 From: Louca Dufault <40028187+loucadufault@users.noreply.github.com> Date: Thu, 6 Jan 2022 22:47:53 -0500 Subject: [PATCH] update docs and bump --- docs/public/README.template.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/public/README.template.md b/docs/public/README.template.md index a44bc4c..027fb9c 100644 --- a/docs/public/README.template.md +++ b/docs/public/README.template.md @@ -2,7 +2,7 @@ A lightweight package to generate unique and uniformly sampled colors from UUIDs The RGB color space is represented and spanned by hexadecimal numbers in the 0x000000 to 0xffffff range. We can use a simple modulo hash function (`% (0xffffff + 0x000001)` i.e. `% 0x100000`) to return numbers in that range from the decimal representation of the UUID (a base 10 39-digit integer). We then extract the red, green, and blue components from the resulting hash (which represents a specific color in hexadecimal notation) using bit masks. -Since the color space is only 255^3 whereas the UUID space is much larger (5.3 x 10^36 possible UUIDs), it is impossible to create a complete bijection, and collisions in the generated color space are more likely to happen. +Since the color space is only 255^3 whereas the UUID space is much larger ([approximtely 5.3 x 10^36 possible UUIDs](https://www.uuidtools.com/what-is-uuid#overview)), it is impossible to create a complete bijection between the spaces, and so collisions in the generated color space are more likely to happen. This package does guarantee that the color space is maximally utilized, assuming a uniform distribution of the input UUIDs in the UUID space. # Installation: diff --git a/package.json b/package.json index 5327a51..a2a9735 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uuid-color", - "version": "0.0.1", + "version": "0.0.2", "description": "A lightweight package to generate unique and uniformly sampled colors from UUIDs.", "main": "lib/index.js", "scripts": {