Added a check on the getgrayscale method of colorutils to make sure the number is positive