NanoXLSX.Writer 3.0.0-rc.3
Loading...
Searching...
No Matches
IColorWriter.cs
1/*
2 * NanoXLSX is a small .NET library to generate and read XLSX (Microsoft Excel 2007 or newer) files in an easy and native way
3 * Copyright Raphael Stoeckli © 2025
4 * This library is licensed under the MIT License.
5 * You find a copy of the license in project folder or on: http://opensource.org/licenses/MIT
6 */
7
8using NanoXLSX.Colors;
9using NanoXLSX.Utils.Xml;
10using System.Collections.Generic;
11
13{
17 public interface IColorWriter
18 {
24 string GetAttributeName(Color color);
30 string GetAttributeValue(Color color);
31
37 bool UseTintAttribute(Color color);
38
44 string GetTintAttributeValue(Color color);
45
51 IEnumerable<XmlAttribute> GetAttributes(Color color);
52 }
53}
Interface, used by specific writers that provides color handling.
string GetAttributeName(Color color)
Gets the attribute name for the given color instance.
IEnumerable< XmlAttribute > GetAttributes(Color color)
Gets all applicable attributes of the given color instance.
string GetAttributeValue(Color color)
Gets the attribute value for the given color instance.
string GetTintAttributeValue(Color color)
Gets the tint value as string of the given color instance, if applicable (see UseTintAttribute(Color)...
bool UseTintAttribute(Color color)
Gets whether a tint value is used for the given color instance.