/src/main/java/org/htmlunit/util/StringUtils.java
if ( parts == null) {
if ( s == 0f ) {
final float tmpHue = Float.parseFloat(tmpMatcher.group(1)) / 360f; final float tmpSaturation = Float.parseFloat(tmpMatcher.group(4)) / 100f; final float tmpLightness = Float.parseFloat(tmpMatcher.group(7)) / 100f; return hslToRgb(tmpHue, tmpSaturation, tmpLightness); } private static Color hslToRgb(final float h, final float s, final float l) { <extra_id_0> return new Color(to255(l), to255(l), to255(l)); } final float q = l < 0.5f ? l * (1 + s) : l + s - l * s; final float p = 2 * l - q; final float r = hueToRgb(p, q, h + 1f / 3f); final float g = hueToRgb(p, q, h);