- if ((hue < 0) || (hue > 1) || (saturation < 0) || (saturation > 1) || (value < 0) ||
- (value > 1)) throw new IllegalArgumentException(
- "hue, saturation, value and alpha must all be between 0 and 1");
+ if ((hue < -0.00005) || (hue > 1.0000005) || (saturation < 0) || (saturation > 1) ||
+ (value < 0) || (value > 1)) throw new IllegalArgumentException(String.format(
+ "hue, saturation, value and alpha must all be between 0 and 1. Arguments given: " +
+ "hue=%1.5f, sat=%1.5f, val=%1.5f", hue, saturation, value));