loci.formats.gui

## Class TwoChannelColorSpace

- java.lang.Object
- - java.awt.color.ColorSpace
  - - loci.formats.gui.TwoChannelColorSpace

- All Implemented Interfaces:
    java.io.Serializable

      public class TwoChannelColorSpace
      extends java.awt.color.ColorSpace

  ColorSpace for 2-channel images.
  Author:
    Melissa Linkert melissa at glencoesoftware.com
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CS_2C`
    `private static int` | `NUM_COMPONENTS`

    - ### Fields inherited from class java.awt.color.ColorSpace

      `CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TwoChannelColorSpace(int type, int components)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float[]` | `fromCIEXYZ(float[] color)`
    `float[]` | `fromRGB(float[] rgb)`
    `static java.awt.color.ColorSpace` | `getInstance(int colorSpace)`
    `java.lang.String` | `getName(int idx)`
    `int` | `getNumComponents()`
    `int` | `getType()`
    `boolean` | `isCS_sRGB()`
    `float[]` | `toCIEXYZ(float[] color)`
    `float[]` | `toRGB(float[] color)`

    - ### Methods inherited from class java.awt.color.ColorSpace

      `getMaxValue, getMinValue`

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

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

- - ### Field Detail

    - #### CS_2C

          public static final int CS_2C

      See Also:
        Constant Field Values

    - #### NUM_COMPONENTS

          private static final int NUM_COMPONENTS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TwoChannelColorSpace

          protected TwoChannelColorSpace(int type,
                                         int components)

  - ### Method Detail

    - #### fromCIEXYZ

          public float[] fromCIEXYZ(float[] color)

      Specified by:
        `fromCIEXYZ` in class `java.awt.color.ColorSpace`

    - #### fromRGB

          public float[] fromRGB(float[] rgb)

      Specified by:
        `fromRGB` in class `java.awt.color.ColorSpace`

    - #### getInstance

          public static java.awt.color.ColorSpace getInstance(int colorSpace)

    - #### getName

          public java.lang.String getName(int idx)

      Overrides:
        `getName` in class `java.awt.color.ColorSpace`

    - #### getNumComponents

          public int getNumComponents()

      Overrides:
        `getNumComponents` in class `java.awt.color.ColorSpace`

    - #### getType

          public int getType()

      Overrides:
        `getType` in class `java.awt.color.ColorSpace`

    - #### isCS_sRGB

          public boolean isCS_sRGB()

      Overrides:
        `isCS_sRGB` in class `java.awt.color.ColorSpace`

    - #### toCIEXYZ

          public float[] toCIEXYZ(float[] color)

      Specified by:
        `toCIEXYZ` in class `java.awt.color.ColorSpace`

    - #### toRGB

          public float[] toRGB(float[] color)

      Specified by:
        `toRGB` in class `java.awt.color.ColorSpace`

Copyright © 2026 Open Microscopy Environment