Here's the code I tried:
- Code: Select all
CTFill blueFill = new CTFill();
CTPatternFill bluePatternfill = new CTPatternFill();
bluePatternfill.setPatternType(STPatternType.SOLID);
CTColor blue = new CTColor();
blue.setTint(0.6);
byte[] rgbBlue = "4BACC6".getBytes();
blue.setRgb(rgbBlue);
bluePatternfill.setFgColor(blue);
bluePatternfill.setBgColor(bgColor);
blueFill.setPatternFill(bluePatternfill);
styleSheet.getFills().getFill().add(blueFill);
All the code surrounding it should be in order, because as soon as I add the theme and replace setRgb with setTheme, it works perfectly. Any idea why this doesn't work?