RtfColorTable (Apache FOP Core 2.11 API)
Date: 2025-04-24

org.apache.fop.render.rtf.rtflib.rtfdoc

## Class RtfColorTable

- java.lang.Object
- - org.apache.fop.render.rtf.rtflib.rtfdoc.RtfColorTable

-     public final class RtfColorTable
      extends Object

  Singelton of the RTF color table. This class was created for fo:basic-link tag processing. This work was originally authored by Andreas Putz

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Integer` | `getColorNumber(int red, int green, int blue)` Gets the number of color in the color table
    `Integer` | `getColorNumber(String name)`
    `static RtfColorTable` | `getInstance()` Singelton.
    `void` | `writeColors(org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader header)` Writes the color table in the header.

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

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

- - ### Method Detail

    - #### getInstance

          public static RtfColorTable getInstance()

      Singelton.
      Returns:
        The instance of RTFColorTable

    - #### getColorNumber

          public Integer getColorNumber(String name)

      Parameters:
        `name` - a named color
      Returns:
        the RTF number of a named color, or null if name not found

    - #### getColorNumber

          public Integer getColorNumber(int red,
                                        int green,
                                        int blue)

      Gets the number of color in the color table
      Parameters:
        `red` - Color level red
        `green` - Color level green
        `blue` - Color level blue
      Returns:
        The number of the color in the table

    - #### writeColors

          public void writeColors(org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader header)
                           throws IOException

      Writes the color table in the header.
      Parameters:
        `header` - The header container to write in
      Throws:
        `IOException` - On error

Copyright © 2025 Apache Software Foundation. All rights reserved.