Workbook.GetThemeColor

Workbook.GetThemeColor method

Gets theme color.

public Color GetThemeColor(ThemeColorType type)
ParameterTypeDescription
typeThemeColorTypeThe theme color type.

Return Value

The theme color.

Examples

using System;
using System.Drawing;
using Aspose.Cells;

namespace AsposeCellsExamples
{
    public class WorkbookMethodGetThemeColorWithThemeColorTypeDemo
    {
        public static void Run()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            
            // Get theme color for Accent6
            Color color = workbook.GetThemeColor(ThemeColorType.Accent6);
            Console.WriteLine("Theme Color (Accent6): " + color.ToString());
            
            // Save the workbook
            workbook.Save("output.xlsx");
        }
    }
}

See Also