Goonstation 13 - Modules - Types

_std/color.dm

/proc/mult_color_matrixTakes two 20-length lists, turns them into 5x4 matrices, multiplies them together, and returns a 20-length list
/proc/normalize_color_to_matrixTakes a possible value of the color var and returns a length 20 color matrix doing the same thing. Available inputs: null, "#rgb", "#rrggbb", "#rgba", "#rrggbbaa", all forms of color matrices
/proc/color_mapping_matrixTakes two lists, inp=list(i1, i2, i3), out=(o1, o2, o3). Creates a color matrix which maps color i1 to o2, i2 to o2, i3 to o3. (Ignores alpha values.) Keep the i1, i2, i3 vectors linearly independent. The colors can be either be color hex strings or lists as returned from hex_to_rgb_list. You need to supply all arguments. If you don't care about the third just set i3 = o3 to something linearly independent of i1 and i2.
/proc/affine_color_mapping_matrixThe same thing as [proc/color_mapping_matrix] but with 4 mapped colors. The first color is used as the origin in the affine transform.
/proc/hsv_transform_color_matrixGenerates a color matrix which performs an approximation of the HSV-space transform. Hue is in degrees and is applied additively. Saturation is in a 0-1 range and is applied multiplicatively. Value is in a 0-1 range and is applied multiplicatively.
/proc/get_average_colorTakes an icon and optionally two non-zero Pixel Intervals and returns the average color of the icon.
/proc/derive_color_from_hue_offset
/proc/derive_complementary_color
/proc/derive_analogous_colors
/proc/derive_triadic_colors
/proc/derive_square_colors