danny, I'd do it by placing each pair of colors/layers into a list, then calling the function in a foreach or mapcar, like this:
(setq colorlist '((7 . "_XBOLD")
(2 . " _BOLD")
(4 . "_MED")
(1 . " _FINE")
(5 . "_XFINE")
(8 . "_XXFINE")
))
(foreach x colorlist
(color2layer (car x) (cdr x))
)