deterministic-title-placeholder-painter
Installation
SKILL.md
Deterministic title placeholder painter
Items without artwork need better than a shared grey square: something unique per item, identical
every time, and available synchronously — before, during and instead of a network load. Hashing the
title into a gradient gives all three; a Painter lets the loader treat it as an image.
// adapted
private fun gradientFromTitle(title: String): List<Color> {
val hash = title.hashCode()
val hue1 = ((hash and 0xFF) / 255f) * 360f
val hue2 = (((hash shr 8) and 0xFF) / 255f) * 360f
return listOf(hsvToColor(hue1, 0.7f, 0.9f), hsvToColor(hue2, 0.7f, 0.85f))
}