org.apache.poi.hssf.record.common

## Class ExtendedColor

- java.lang.Object
- - org.apache.poi.hssf.record.common.ExtendedColor

- All Implemented Interfaces:
    Duplicatable

      public final class ExtendedColor
      extends java.lang.Object
      implements Duplicatable

  Title: CTColor (Extended Color) record part

  The HSSF file format normally stores Color information in the Palette (see PaletteRecord), but for a few cases (eg Conditional Formatting, Sheet Extensions), this XSSF-style color record can be used.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `THEME_ACCENT_1`
    `static int` | `THEME_ACCENT_2`
    `static int` | `THEME_ACCENT_3`
    `static int` | `THEME_ACCENT_4`
    `static int` | `THEME_ACCENT_5`
    `static int` | `THEME_ACCENT_6`
    `static int` | `THEME_DARK_1`
    `static int` | `THEME_DARK_2`
    `static int` | `THEME_FOLLOWED_HYPERLINK`
    `static int` | `THEME_HYPERLINK`
    `static int` | `THEME_LIGHT_1`
    `static int` | `THEME_LIGHT_2`
    `static int` | `TYPE_AUTO`
    `static int` | `TYPE_INDEXED`
    `static int` | `TYPE_RGB`
    `static int` | `TYPE_THEMED`
    `static int` | `TYPE_UNSET`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExtendedColor()`
    `ExtendedColor(ExtendedColor other)`
    `ExtendedColor(LittleEndianInput in)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `ExtendedColor` | `clone()` Deprecated.
    `ExtendedColor` | `copy()`
    `int` | `getColorIndex()`
    `int` | `getDataLength()`
    `byte[]` | `getRGBA()`
    `int` | `getThemeIndex()`
    `double` | `getTint()`
    `int` | `getType()`
    `void` | `serialize(LittleEndianOutput out)`
    `void` | `setColorIndex(int colorIndex)`
    `void` | `setRGBA(byte[] rgba)`
    `void` | `setThemeIndex(int themeIndex)`
    `void` | `setTint(double tint)`
    `void` | `setType(int type)`
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### TYPE_AUTO

          public static final int TYPE_AUTO

      See Also:
        Constant Field Values

    - #### TYPE_INDEXED

          public static final int TYPE_INDEXED

      See Also:
        Constant Field Values

    - #### TYPE_RGB

          public static final int TYPE_RGB

      See Also:
        Constant Field Values

    - #### TYPE_THEMED

          public static final int TYPE_THEMED

      See Also:
        Constant Field Values

    - #### TYPE_UNSET

          public static final int TYPE_UNSET

      See Also:
        Constant Field Values

    - #### THEME_DARK_1

          public static final int THEME_DARK_1

      See Also:
        Constant Field Values

    - #### THEME_LIGHT_1

          public static final int THEME_LIGHT_1

      See Also:
        Constant Field Values

    - #### THEME_DARK_2

          public static final int THEME_DARK_2

      See Also:
        Constant Field Values

    - #### THEME_LIGHT_2

          public static final int THEME_LIGHT_2

      See Also:
        Constant Field Values

    - #### THEME_ACCENT_1

          public static final int THEME_ACCENT_1

      See Also:
        Constant Field Values

    - #### THEME_ACCENT_2

          public static final int THEME_ACCENT_2

      See Also:
        Constant Field Values

    - #### THEME_ACCENT_3

          public static final int THEME_ACCENT_3

      See Also:
        Constant Field Values

    - #### THEME_ACCENT_4

          public static final int THEME_ACCENT_4

      See Also:
        Constant Field Values

    - #### THEME_ACCENT_5

          public static final int THEME_ACCENT_5

      See Also:
        Constant Field Values

    - #### THEME_ACCENT_6

          public static final int THEME_ACCENT_6

      See Also:
        Constant Field Values

    - #### THEME_HYPERLINK

          public static final int THEME_HYPERLINK

      See Also:
        Constant Field Values

    - #### THEME_FOLLOWED_HYPERLINK

          public static final int THEME_FOLLOWED_HYPERLINK

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ExtendedColor

          public ExtendedColor()

    - #### ExtendedColor

          public ExtendedColor(ExtendedColor other)

    - #### ExtendedColor

          public ExtendedColor(LittleEndianInput in)

  - ### Method Detail

    - #### getType

          public int getType()

    - #### setType

          public void setType(int type)

    - #### getColorIndex

          public int getColorIndex()

      Returns:
        Palette color index, if type is `TYPE_INDEXED`

    - #### setColorIndex

          public void setColorIndex(int colorIndex)

    - #### getRGBA

          public byte[] getRGBA()

      Returns:
        Red Green Blue Alpha, if type is `TYPE_RGB`

    - #### setRGBA

          public void setRGBA(byte[] rgba)

    - #### getThemeIndex

          public int getThemeIndex()

      Returns:
        Theme color type index, eg `THEME_DARK_1`, if type is `TYPE_THEMED`

    - #### setThemeIndex

          public void setThemeIndex(int themeIndex)

    - #### getTint

          public double getTint()

      Returns:
        Tint and Shade value, between -1 and +1

    - #### setTint

          public void setTint(double tint)

      Parameters:
        `tint` - Tint and Shade value, between -1 and +1

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### clone

          @Deprecated
           @Removal(version="5.0.0")
          public ExtendedColor clone()

      Deprecated.
      Overrides:
        `clone` in class `java.lang.Object`

    - #### copy

          public ExtendedColor copy()

      Specified by:
        `copy` in interface `Duplicatable`
      Returns:
        a deep copy of the implementing class / instance

    - #### getDataLength

          public int getDataLength()

    - #### serialize

          public void serialize(LittleEndianOutput out)

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.