## ThemeColor class

Repräsentiert eine Designfarbe.

```csharp
public class ThemeColor
```

## Konstrukteure

| Name | Beschreibung |
| --- | --- |
| [ThemeColor](themecolor)(ThemeColorType, double) |  |

## Eigenschaften

| Name | Beschreibung |
| --- | --- |
| [ColorType](../../aspose.cells/themecolor/colortype) { get; set; } | Ruft den Thementyp ab und legt ihn fest. |
| [Tint](../../aspose.cells/themecolor/tint) { get; set; } | Ruft den Farbtonwert ab und legt ihn fest. |

### Beispiele

```csharp

[C#]

//Instanziieren eines Workbook-Objekts
Workbook workbook = new Workbook();
Cells cells = workbook.Worksheets[0].Cells;
cells["A1"].PutValue("Hello World");
Style style = cells["A1"].GetStyle();
// Setzt den Farbtyp ThemeColorType.Text2 mit 40 % Aufhellung als Schriftfarbe.
style.Font.ThemeColor = new ThemeColor(ThemeColorType.Text2, 0.4);
style.Pattern = BackgroundType.Solid;
// Setze ThemeColorType.Background2 Farbtyp mit 75% Abdunkelung als Vordergrundfarbe
style.ForegroundThemeColor = new ThemeColor(ThemeColorType.Background2, -0.75);
cells["A1"].SetStyle(style);
//Speichern der Excel-Datei
workbook.Save("book1.xlsx");

[Visual Basic]

'Instanziieren eines Workbook-Objekts
Dim workbook As Workbook = New Workbook()
Dim cells As Cells = workbook.Worksheets(0).Cells
cells("A1").PutValue("Hello World")
'Holen Sie sich den Zellenstil
Dim style As Style = cells("A1").GetStyle()
'Stellen Sie den Farbtyp ThemeColorType.Text2 mit 40 % Aufhellung als Schriftfarbe ein.
Style.Font.ThemeColor = New ThemeColor(ThemeColorType.Text2, 0.4)
Style.Pattern = BackgroundType.Solid
'Stellen Sie den Farbtyp ThemeColorType.Background2 mit 75 % Abdunkelung als Vordergrundfarbe ein
style.ForegroundThemeColor = New ThemeColor(ThemeColorType.Background2, -0.75)
'Legen Sie den Zellenstil fest
cells("A1").SetStyle(style)
'Speichern der Excel-Datei
Workbook.Save("book1.xlsx")
```

### Siehe auch

* namensraum [Aspose.Cells](../../aspose.cells)
* Montage [Aspose.Cells](../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.dll -->
