gitbrent / PptxGenJS

Create PowerPoint presentations with a powerful, concise JavaScript API.
https://gitbrent.github.io/PptxGenJS/
MIT License
2.84k stars 625 forks source link

added bullet.color option #1246

Open mikemeerschaert opened 1 year ago

mikemeerschaert commented 1 year ago

This pr adds the option to supply a color to the bullet object, so you can add color to the bullets without coloring the text.

I'd like to update the documentation as well, but I'm not sure how to do it, if someone can point me in the right direction I'd be happy to add that in.

e.g.

slide.addText(
  [
    {
      text: "Bullet 1",
      options: {
        bullet: { code: "25BA", color: "0000FF" },
      },
    },
    {
      text: "Bullet 2",
      options: {
        bullet: { code: "25BA", color: "FF0000" },
      },
    },

    {
      text: "Bullet 3",
      options: {
        bullet: { code: "25BA", color: "00FF00" },
      },
    },
  ]
)