/tg/ Station 13 - Modules - Types

code/__HELPERS/colors.dm

/proc/is_color_darkGiven a color in the format of "#RRGGBB", will return if the color is dark.
/proc/expand_three_digit_colorGiven a 3 character color (no hash), converts it into #RRGGBB (with hash)
/proc/split_colorGiven a color in the format of "#RRGGBB" or "#RRGGBBAA", gives back a 4 entry list with the number values of each
/proc/random_colourReturns a random color picked from a list, has 2 modes (0 and 1), mode 1 doesn't pick white, black or gray
/proc/invert_HTML_colourInverts the colour of an HTML string
/proc/flash_colorFlash a color on the passed mob
/proc/blend_screen_colorBlends together two colors (passed as 3 or 4 length lists) using the screen blend mode Much like multiply, screen effects the brightness of the resulting color Screen blend will always lighten the resulting color, since before multiplication we invert the colors This makes our resulting output brighter instead of darker
/proc/blend_cutoff_colorsUsed to blend together two different color cutoffs Uses the screen blendmode under the hood, essentially just /proc/blend_screen_color But paired down and modified to work for our color range Accepts the color cutoffs as two 3 length list(0-100,...) arguments
/proc/colorize_stringGets a color for a name, will return the same color for a given string consistently within a round.atom
/proc/apply_matrix_to_colorApplies a color filter to a hex/RGB list color
/proc/filter_appearance_recursiveRecursively applies a filter to a passed in static appearance, returns the modified appearance