code/datums/named_colors.dm
color_dist2 | distance^2 between first and second RGB values |
---|---|
/datum/named_color | the datum holding one named color |
/var/named_colors | global list of all named colors |
/var/named_color_cache | global cache of all named colors once fetched with a color rgba |
/proc/get_nearest_color | returns the name of the color nearest to the given color RGB |
/proc/get_nearest_color_datum | returns the named_color datum that is nearest to the given color RGB |
/proc/add_color | adds a named color to the global list given name and RGB color |
/proc/create_named_colors | called at world startup populates the color list |
Define Details
color_dist2
distance^2 between first and second RGB values