ColorFormat — Aspose.Slides FOSS for .NET API Reference
Enumerations ColorFormat class repräsentiert einen Farbwert, der in der gesamten Slides API – für Füllungen, Linien, Schriften, Effekte und mehr – verwendet wird. Sie unterstützt RGB‑Farben, Schema‑Farben (themenabhängig) und vordefinierte benannte Farben.
Enumerations: Aspose.Slides.Foss (net9.0)
using Aspose.Slides.Foss;public class ColorFormat : IColorFormatEnumerations
| Enumerations | Enumerations | Enumerations | Enumerations |
|---|---|---|---|
ColorType | ColorType | Enumerations | Typ der Farbe (RGB, Schema, Vorgabe usw.). |
Color | Color? | Enumerations | Aufgelöster ARGB‑Farbwert. |
PresetColor | PresetColor | Enumerations | Name der Vorgabefarbe, falls zutreffend. |
SchemeColor | SchemeColor | Enumerations | Thema‑Schema‑Farbe, falls zutreffend. |
R | int | Enumerations | Roter Anteil (0–255). |
G | int | Enumerations | Grüner Anteil (0–255). |
B | int | Enumerations | Blauer Anteil (0–255). |
FloatR | float | Enumerations | Roter Anteil als Float (0.0–1.0). |
FloatG | float | Enumerations | Grüner Anteil als Float (0.0–1.0). |
FloatB | float | Enumerations | Blau‑Komponente als Fließkommazahl (0.0–1.0). |
Hue | float | Enumerations | Farbtonwert. |
Saturation | float | Enumerations | Sättigungswert. |
Luminance | float | Enumerations | Luminanzwert. |
Anwendungsbeispiele
Farbe aus einer Formfüllung lesen
using Aspose.Slides.Foss;
using var prs = new Presentation("deck.pptx");
var shape = prs.Slides[0].Shapes[0];
var color = shape.FillFormat.SolidFillColor;
Console.WriteLine($"Type: {color.ColorType}");
Console.WriteLine($"RGB: ({color.R}, {color.G}, {color.B})");
Console.WriteLine($"Resolved: {color.Color}");