UNPKG

random-color-library

Version:

Generate random colors from the Material Design color palette.

11 lines (10 loc) 519 B
export declare function randomIntFromHash(key: string, max: number): number; export declare function getRandomInt(max: number): number; /** * MurmurHash3 is a non-cryptographic hash function suitable for general hash-based lookup. * This implementation processes the input string in 4-byte chunks and then handles any * remaining bytes. The constants and mixing steps are based on the MurmurHash3 algorithm. * * https://en.wikipedia.org/wiki/MurmurHash */ export declare function murmur3_32(key: string): number;