# a3.py # YOUR NAME(S) AND NETID(S) HERE # THE DATE HERE """ Functions for Assignment A3 These functions are for creating transformed versions of RGB objects (colors). One format for such transformations is 3-item lists of 3-item lists. """ # Throughout, we use "number" to mean an item of type either float or int. def complement_rgb(rgb): """Returns: a new RGB object that is the complement of color . Used as the color of the font in the color panels of the a3app application. Precondition: is an RGB object""" pass # TODO: implement me! def list_to_rgb(clist): """Returns: a new RGB object whose components are specified by . The new object's red attribute will be clist[0], the green attribute will be clist[1], and the blue attribute will be clist[2]. Precondition: is a list of three ints in 0..255. (See colormodels.py for explanation of the ".." notation.""" # You may or may not find this to be a useful helper function in your # later code. But whether or not you choose to use it, you must implement it. pass # TODO: implement me! def rgb_to_string(rgb): """Returns: string representation of in the form "(R, G, B)". Used to display the R, G, and B values in the application. Precondition: is an RGB object""" # Be careful to get all the punctuation and spacing precisely correct. return '' # TODO: Implement me! def components_to_num(coeffs, rgb): """Returns: the linear combination specified by of s component values. This will be a single number. Preconditions: is a list of three numbers. is an RGB object.""" return 0 # TODO: implement me! def apply_matrix(matrix, rgb): """Returns: a new color object resulting from applying to color . Precondition: is a 3-item list, each item of which is a a 3-item list of numbers. is an RGB object.""" # You should call Python's round() function pass # TODO: Implement me!