NanoXLSX.Core 3.0.0-rc.4
Loading...
Searching...
No Matches
ThemeColor.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
10using NanoXLSX.Utils;
11
12namespace NanoXLSX.Colors
13{
17 public class ThemeColor : ITypedColor<Theme.ColorSchemeElement>
18 {
23
27 public string StringValue
28 {
29 get
30 {
31 return ParserUtils.ToString((int)ColorValue);
32 }
33 }
34
38 public ThemeColor()
39 {
40 }
41
47 {
48 ColorValue = color;
49 }
50
56 public override bool Equals(object obj)
57 {
58 return obj is ThemeColor color &&
59 ColorValue == color.ColorValue;
60 }
61
66 public override int GetHashCode()
67 {
68 return 800285905 + ColorValue.GetHashCode();
69 }
70 }
71}
ThemeColor()
Default constructor.
Definition ThemeColor.cs:38
ThemeColor(Theme.ColorSchemeElement color)
Constructor with parameters.
Definition ThemeColor.cs:46
override bool Equals(object obj)
Determines whether the specified object is equal to the current system color instance.
Definition ThemeColor.cs:56
override int GetHashCode()
Gets the hash code of the instance.
Definition ThemeColor.cs:66
Theme.ColorSchemeElement ColorValue
Gets or sets the color scheme element.
Definition ThemeColor.cs:22
string StringValue
Gets the internal, numeric OOXML string value of the enum, defined in ColorValue.
Definition ThemeColor.cs:28
Class representing an Office theme.
Definition Theme.cs:17
ColorSchemeElement
Enum to define the sequence index of color scheme element, used in the implementations of Interfaces....
Definition Theme.cs:36
Class providing static methods to parse string values to specific types or to print object as languag...
static string ToString(int input)
Transforms an integer to an invariant sting.