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 : IColorFormat

Enumerations

EnumerationsEnumerationsEnumerationsEnumerations
ColorTypeColorTypeEnumerationsTyp der Farbe (RGB, Schema, Vorgabe usw.).
ColorColor?EnumerationsAufgelöster ARGB‑Farbwert.
PresetColorPresetColorEnumerationsName der Vorgabefarbe, falls zutreffend.
SchemeColorSchemeColorEnumerationsThema‑Schema‑Farbe, falls zutreffend.
RintEnumerationsRoter Anteil (0–255).
GintEnumerationsGrüner Anteil (0–255).
BintEnumerationsBlauer Anteil (0–255).
FloatRfloatEnumerationsRoter Anteil als Float (0.0–1.0).
FloatGfloatEnumerationsGrüner Anteil als Float (0.0–1.0).
FloatBfloatEnumerationsBlau‑Komponente als Fließkommazahl (0.0–1.0).
HuefloatEnumerationsFarbtonwert.
SaturationfloatEnumerationsSättigungswert.
LuminancefloatEnumerationsLuminanzwert.

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}");

Siehe auch

 Deutsch