public static PDFBaseColorWrapper getBaseColor(String key) {
String colorValueStr = pdfInvoiceProperties.getProperty(key);
if (!colorValueStr.isEmpty()) {
String[] colors = colorValueStr.split(VALUE_DELIMITER);
if (colors.length != 3) {
PDFInvoiceRendererBeanException e = new PDFInvoiceRendererBeanException(key);
e.setHint(" Use RGB color model to define your desired color. For example: 117,87,79");
throw e;
}
return new PDFBaseColorWrapper(Integer.parseInt(colors[0]), Integer.parseInt(colors[1]), Integer.parseInt(colors[2]));
} else {
throw new PDFInvoiceRendererBeanException(key);
}
}