Read Color of Shape's Glow Effect
Possible Usage Scenarios
If you want to read the color of the glow effect of any shape, then please use the Shape.Glow.Color property. It will help you find the various properties relating to the color of the glow effect of the shape.
Read Color of the Glow Effect of Shape
Please see the following sample code and its source excel file and the console output for your reference. The following screenshot shows the glow effect of the shape inside the source excel file when viewed in Microsoft Excel.
C# code to read color of shapes glow effect
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Read the source excel file | |
Workbook book = new Workbook(dataDir + "sourceGlowEffectColor.xlsx"); | |
// Access first worksheet | |
Worksheet sheet = book.Worksheets[0]; | |
// Access the shape | |
Shape shape = sheet.Shapes[0]; | |
// Read the glow effect color and its various properties | |
GlowEffect effect = shape.Glow; | |
CellsColor color = effect.Color; | |
Console.WriteLine("Color: " + color.Color); | |
Console.WriteLine("ColorIndex: " + color.ColorIndex); | |
Console.WriteLine("IsShapeColor: " + color.IsShapeColor); | |
Console.WriteLine("Transparency: " + color.Transparency); | |
Console.WriteLine("Type: " + color.Type); |
Console Output
Here is the console output of the above sample code when executed with the provided source excel file.
Color: Color [A=222, R=255, G=0, B=0]
ColorIndex: 16711672
IsShapeColor: True
Transparency: 0.13
Type: RGB