We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to change bullet colors

How to change bullet colors?


Thanks for your inquiry. You need to set ListLevel.Font.Color property to set bullet colors. Please check following sample code, it will help you to accomplish the task.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.ListFormat.List = doc.Lists.Add(ListTemplate.BulletCircle);
builder.ListFormat.ListLevel.Font.Color = Color.Red;
builder.Writeln("Main Section 1");

builder.ListFormat.ListLevel.Font.Color = Color.Green;
builder.ListFormat.ListLevel.NumberStyle = NumberStyle.Bullet;
builder.Writeln("Sub Section1.1 ");

builder.Writeln("Main Section 2");

builder.Writeln("Sub Section 2.1");