String (Color color) { float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null); DecimalFormat df = new DecimalFormat(DECIMAL_FORMAT_PATTERN, DECIMAL_FORMAT_SYMBOLS); StringJoiner args = new StringJoiner(",", "(", ")"); args.add(df.format(hsb[0] * 360)); args.add(df.format(hsb[1])); args.add(df.format(hsb[2])); if (color.getAlpha() != 255) { args.add(formatScaledComponent(color.getAlpha())); } return HSB + args; }