Test for a 'color' type before calculating darken and lightness