Goonstation 13 - Modules - TypesDefine Details

code/datums/named_colors.dm

color_dist2distance^2 between first and second RGB values
/datum/named_colorthe datum holding one named color
/var/named_colorsglobal list of all named colors
/var/named_color_cacheglobal cache of all named colors once fetched with a color rgba
/proc/get_nearest_colorreturns the name of the color nearest to the given color RGB
/proc/get_nearest_color_datumreturns the named_color datum that is nearest to the given color RGB
/proc/add_coloradds a named color to the global list given name and RGB color
/proc/create_named_colorscalled at world startup populates the color list

Define Details

color_dist2

distance^2 between first and second RGB values