Crates.io | colorhash |
lib.rs | colorhash |
version | 0.1.3 |
source | src |
created_at | 2024-01-21 10:33:03.553806 |
updated_at | 2024-01-21 23:11:59.483806 |
description | A hashing function to convert text strings into colors |
homepage | |
repository | https://github.com/berkus/colorhash |
max_upload_size | |
id | 1107484 |
size | 11,345 |
Convert a string to a color representation consistently by using a sha256 hash.
Based on color-hash for JS. Doesn't use a custom hashing function, it's always sha256.
To try out how it works:
rustup target add wasm32-unknown-unknown
cargo install trunk
cd demo-page
trunk serve
You should see a result like this: