Package com.independentsoft.office.spreadsheet.extensions

# Class X14Color

java.lang.Object
com.independentsoft.office.spreadsheet.extensions.X14Color

public class X14Color extends Object
Represents a color element (CT_Color) inside an x14 extension, such as `x14:borderColor`, `x14:negativeFillColor`, `x14:axisColor` or the `x14:color*` sparkline colors.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `X14Color​(InternalXMLStreamReader reader, String elementName)`
  Instantiates a new x14 color.
  `X14Color​(String elementName)`
  Instantiates a new x14 color.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `X14Color`
  `clone()`
  `String`
  `getColor()`
  Gets the color as ARGB hex value.
  `String`
  `getElementName()`
  Gets the local name of the color element.
  `int`
  `getIndexedColor()`
  Gets the indexed color value.
  `int`
  `getTheme()`
  Gets the theme color index.
  `Double`
  `getTint()`
  Gets the tint applied to the color, or null when it is not set.
  `boolean`
  `isAuto()`
  Gets whether the color is automatic.
  `void`
  `setAuto​(boolean auto)`
  Sets whether the color is automatic.
  `void`
  `setColor​(String color)`
  Sets the color as ARGB hex value.
  `void`
  `setIndexedColor​(int indexedColor)`
  Sets the indexed color value.
  `void`
  `setTheme​(int theme)`
  Sets the theme color index.
  `void`
  `setTint​(Double tint)`
  Sets the tint applied to the color.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### X14Color

    public X14Color​(String elementName)
    Instantiates a new x14 color.
    Parameters:
      `elementName` - the local name of the color element (e.g. "borderColor", "colorSeries")

  - ### X14Color

    public X14Color​(InternalXMLStreamReader reader, String elementName) throws XMLStreamException
    Instantiates a new x14 color.

    Enters positioned ON the start element and leaves positioned ON the end element, so the caller's loop advances past it.

    Parameters:
      `reader` - the reader
      `elementName` - the local name of the color element
    Throws:
      `XMLStreamException` - the XML stream exception

- ## Method Details

  - ### clone

    public X14Color clone()
    Overrides:
      `clone` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getElementName

    public String getElementName()
    Gets the local name of the color element.
    Returns:
      the element name

  - ### isAuto

    public boolean isAuto()
    Gets whether the color is automatic.
    Returns:
      true, if the color is automatic

  - ### setAuto

    public void setAuto​(boolean auto)
    Sets whether the color is automatic.
    Parameters:
      `auto` - the new auto flag

  - ### getIndexedColor

    public int getIndexedColor()
    Gets the indexed color value.
    Returns:
      the indexed color

  - ### setIndexedColor

    public void setIndexedColor​(int indexedColor)
    Sets the indexed color value.
    Parameters:
      `indexedColor` - the new indexed color

  - ### getColor

    public String getColor()
    Gets the color as ARGB hex value.
    Returns:
      the color

  - ### setColor

    public void setColor​(String color)
    Sets the color as ARGB hex value.
    Parameters:
      `color` - the new color

  - ### getTheme

    public int getTheme()
    Gets the theme color index.
    Returns:
      the theme

  - ### setTheme

    public void setTheme​(int theme)
    Sets the theme color index.
    Parameters:
      `theme` - the new theme

  - ### getTint

    public Double getTint()
    Gets the tint applied to the color, or null when it is not set.
    Returns:
      the tint

  - ### setTint

    public void setTint​(Double tint)
    Sets the tint applied to the color. A null value removes the attribute.
    Parameters:
      `tint` - the new tint