import seedrandom from "seedrandom" import tinycolor from "tinycolor2" export const getSeededRandom = (seed: any, entropy: any) => { // return Math.floor(seedrandom(Math.floor(seed * entropy)).quick() * 216); return Math.floor(seedrandom(Math.floor(seed * entropy).toString()).quick() * 216) } export const getSeededColor = (seed: any, r = 877, g = 953, b = 991) => { let color = tinycolor({ r: getSeededRandom(seed, r), g: getSeededRandom(seed, g), b: getSeededRandom(seed, b), }) color = color.saturate(10) color = tinycolor.mix(color, "white", 50) return color.toHexString() }