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

org.apache.fop.util

## Class OCAColor

- java.lang.Object
- - java.awt.Color
  - - org.apache.fop.util.OCAColor

- All Implemented Interfaces:
    Paint, Transparency, Serializable

      public class OCAColor
      extends Color

  OCAColor is a single component color representation that is mostly used in AFP documents to represent text foreground color. See also `OCAColorSpace`.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `OCAColor.OCAColorValue`

  - ### Field Summary

    - ### Fields inherited from class java.awt.Color

      `black, BLACK, blue, BLUE, cyan, CYAN, DARK_GRAY, darkGray, gray, GRAY, green, GREEN, LIGHT_GRAY, lightGray, magenta, MAGENTA, orange, ORANGE, pink, PINK, red, RED, white, WHITE, yellow, YELLOW`

    - ### Fields inherited from interface java.awt.Transparency

      `BITMASK, OPAQUE, TRANSLUCENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OCAColor(OCAColor.OCAColorValue oca)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float[]` | `getColorComponents(ColorSpace cspace, float[] compArray)`
    `ColorSpace` | `getColorSpace()`
    `int` | `getOCA()`

    - ### Methods inherited from class java.awt.Color

      `brighter, createContext, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### OCAColor

          public OCAColor(OCAColor.OCAColorValue oca)

  - ### Method Detail

    - #### getOCA

          public int getOCA()

    - #### getColorSpace

          public ColorSpace getColorSpace()

      Overrides:
        `getColorSpace` in class `Color`

    - #### getColorComponents

          public float[] getColorComponents(ColorSpace cspace,
                                            float[] compArray)

      Overrides:
        `getColorComponents` in class `Color`

Copyright © 2025 Apache Software Foundation. All rights reserved.