/tg/ Station 13 - Modules - Types

modular_aphelion/modules/bulge/code/colour_cache.dm

/datum/bulge_bounded_cacheA cache of at most limit entries that drops the oldest first. A dropped entry only costs its computation again.
/proc/get_bulge_paletteThe adaptive palette of a cloth colour in a finish (BULGE_FINISH_*): five "#rrggbb" strings, cloth, light, highlight, shade and deep shade, or null for no colour. One shared list per (colour, finish): never change it.
/proc/sample_fabric_colourThe cloth colour of a worn sprite, as the approved previews sample it: every opaque pixel of rows 21-24, columns 12-18 facing south (GetPixel() x 13-19, y 11-8), tinted (each tint rounds half to even), stable-sorted by Rec. 601 luma; the upper median. Cached by file, state, tints and source revision; a sprite that is neither a file nor text is sampled without being cached. Null when nothing opaque is there.