importClass(Packages.androidx.core.graphics.ColorUtils); let hsl = [300, 1, 0.5]; let rgb = ColorUtils.HSLToColor(hsl); log(rgb); // -65281 log(colors.toString(rgb)); // #ffff00ff hsl = util.java.array("float", 3); ColorUtils.RGBToHSL(255, 0, 255, hsl); log(hsl); // [300.0, 1.0, 0.5]