With this config:
skinparam backgroundcolor transparent
And this UML:
alt successful
Server -> Client: OK
else failure
Server -> Client : ERROR
end
Then generation fails with a NullPointerException.
This patch (bold linies) fixes the bug:
public class ColorMapperMonochrome implements ColorMapper {
public Color getMappedColor(HtmlColor htmlColor) {
if (htmlColor == null) {
return null;
}
if (htmlColor instanceof HtmlColorTransparent) {
return new Color(0,0,0,0);
}
final Color color = new ColorMapperIdentity().getMappedColor(htmlColor);
final int grayScale = (int) (color.getRed() * .3 + color.getGreen() * .59 + color.getBlue() * .11);
return new Color(grayScale, grayScale, grayScale);
}
}
Feel free to use code.
Kind regards,
Søren