# Class C

java.lang.Object
org.jmol.util.C

public final class C extends Object
Note: Color table is now in javajs/util/CU.java

Implements a color index model using a colix as a COLor IndeX.

A colix is a color index represented as a short int.

The value 0 is considered a null value ... for no color. In Jmol this generally means that the value is inherited from some other object.

The value 1 is used to indicate that color only is to be inherited. 0x0001 INHERIT_OPAQUE -- opaque, but with the color coming from the parent. 0x4001 INHERIT_TRANSLUCENT -- translucent but with the color coming from the parent. The value 2 is used to indicate that one of the palettes is to be used. 0x0002 PALETTE, opaque 0x4002 PALETTE, translucent Palettes themselves are coded separately in a Palette ID that is tracked with

Author:
  Miguel, miguel@jmol.org

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`ALPHA_SHIFT`
`static final short`
`BLACK`
`static final short`
`BLUE`
`static final short`
`CHANGEABLE_MASK`
`static final short`
`COLIX_CONTRAST`
`static final short`
`CYAN`
`static final short`
`GOLD`
`static final short`
`GRAY`
`static final short`
`GREEN`
`static final short`
`HOTPINK`
`static final short`
`INHERIT_ALL`
`static final short`
`INHERIT_COLOR`
`static final int`
`LAST_AVAILABLE_COLIX`
`static final short`
`LIME`
`static final short`
`MAGENTA`
`static final short`
`MAROON`
`static final short`
`NAVY`
`static final short`
`OLIVE`
`static final short`
`OPAQUE_MASK`
`static final short`
`ORANGE`
`static final short`
`PINK`
`static final short`
`PURPLE`
`static final short`
`RED`
`static final short`
`SILVER`
`static final short`
`SPECIAL_COLIX_MAX`
`static final short`
`TEAL`
`static final int`
`TRANSLUCENT_MASK`
`static final int`
`TRANSLUCENT_SCREENED`
`static final int`
`TRANSLUCENT_SHIFT`
`static final int`
`TRANSPARENT`
`static final int`
`TRANSPARENT_LEVEL`
`static final short`
`UNMASK_CHANGEABLE_TRANSLUCENT`
`static final short`
`USE_PALETTE`
`static final short`
`WHITE`
`static final short`
`YELLOW`

## Constructor Summary

Constructors
Constructor
Description
`C()`

## Method Summary

Modifier and Type
Method
Description
`static int`
`allocateColix(int argb, boolean forceLast)`
`static final short`
`copyColixTranslucency(short colixFrom, short colixTo)`
`static int`
`getArgb(short colix)`
`static final int`
`getArgbGreyscale(short colix)`
`static short`
`getBgContrast(int argb)`
`static final short`
`getChangeableColixIndex(short colix)`
`static short`
`getColix(int argb)`
`static short[]`
`getColixArray(String colorNames)`
`static final short`
`getColixInherited(short myColix, short parentColix)`
`static short`
`getColixO(Object obj)`
`static short`
`getColixS(String colorName)`
`static float`
`getColixTranslucencyFractional(short colix)`
`static String`
`getColixTranslucencyLabel(short colix)`
`static final int`
`getColixTranslucencyLevel(short colix)`
`static short`
`getColixTranslucent(int argb)`
`static final short`
`getColixTranslucent3(short colix, boolean isTranslucent, float translucentLevel)`
`static String`
`getHexCode(short colix)`
`static String`
`getHexCodes(short[] colixes)`
`static final boolean`
`isColixColorInherited(short colix)`
`static boolean`
`isColixLastAvailable(short colix)`
`static final boolean`
`isColixTranslucent(short colix)`
`static boolean`
`isTransparent(short colix)`
`static final boolean`
`renderPass2(short colix)`

### Methods inherited from class Object

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

## Field Details

### INHERIT_ALL

public static final short INHERIT_ALL

See Also:
  - Constant Field Values

### INHERIT_COLOR

public static final short INHERIT_COLOR

See Also:
  - Constant Field Values

### USE_PALETTE

public static final short USE_PALETTE

See Also:
  - Constant Field Values

### COLIX_CONTRAST

public static final short COLIX_CONTRAST

See Also:
  - Constant Field Values

### SPECIAL_COLIX_MAX

public static final short SPECIAL_COLIX_MAX

See Also:
  - Constant Field Values

### UNMASK_CHANGEABLE_TRANSLUCENT

public static final short UNMASK_CHANGEABLE_TRANSLUCENT

See Also:
  - Constant Field Values

### CHANGEABLE_MASK

public static final short CHANGEABLE_MASK

See Also:
  - Constant Field Values

### LAST_AVAILABLE_COLIX

public static final int LAST_AVAILABLE_COLIX

See Also:
  - Constant Field Values

### TRANSLUCENT_SHIFT

public static final int TRANSLUCENT_SHIFT

See Also:
  - Constant Field Values

### TRANSPARENT_LEVEL

public static final int TRANSPARENT_LEVEL

See Also:
  - Constant Field Values

### ALPHA_SHIFT

public static final int ALPHA_SHIFT

See Also:
  - Constant Field Values

### TRANSLUCENT_MASK

public static final int TRANSLUCENT_MASK

See Also:
  - Constant Field Values

### TRANSLUCENT_SCREENED

public static final int TRANSLUCENT_SCREENED

See Also:
  - Constant Field Values

### TRANSPARENT

public static final int TRANSPARENT

See Also:
  - Constant Field Values

### OPAQUE_MASK

public static final short OPAQUE_MASK

See Also:
  - Constant Field Values

### BLACK

public static final short BLACK

See Also:
  - Constant Field Values

### ORANGE

public static final short ORANGE

See Also:
  - Constant Field Values

### PINK

public static final short PINK

See Also:
  - Constant Field Values

### BLUE

public static final short BLUE

See Also:
  - Constant Field Values

### WHITE

public static final short WHITE

See Also:
  - Constant Field Values

### CYAN

public static final short CYAN

See Also:
  - Constant Field Values

### RED

public static final short RED

See Also:
  - Constant Field Values

### GREEN

public static final short GREEN

See Also:
  - Constant Field Values

### GRAY

public static final short GRAY

See Also:
  - Constant Field Values

### SILVER

public static final short SILVER

See Also:
  - Constant Field Values

### LIME

public static final short LIME

See Also:
  - Constant Field Values

### MAROON

public static final short MAROON

See Also:
  - Constant Field Values

### NAVY

public static final short NAVY

See Also:
  - Constant Field Values

### OLIVE

public static final short OLIVE

See Also:
  - Constant Field Values

### PURPLE

public static final short PURPLE

See Also:
  - Constant Field Values

### TEAL

public static final short TEAL

See Also:
  - Constant Field Values

### MAGENTA

public static final short MAGENTA

See Also:
  - Constant Field Values

### YELLOW

public static final short YELLOW

See Also:
  - Constant Field Values

### HOTPINK

public static final short HOTPINK

See Also:
  - Constant Field Values

### GOLD

public static final short GOLD

See Also:
  - Constant Field Values

## Constructor Details

### C

public C()

## Method Details

### getColix

public static short getColix(int argb)

### allocateColix

public static int allocateColix(int argb, boolean forceLast)

### getArgbGreyscale

public static final int getArgbGreyscale(short colix)

### getColixO

public static short getColixO(Object obj)

### isColixLastAvailable

public static boolean isColixLastAvailable(short colix)

### getArgb

public static int getArgb(short colix)

### isColixColorInherited

public static final boolean isColixColorInherited(short colix)

### getColixInherited

public static final short getColixInherited(short myColix, short parentColix)

### renderPass2

public static final boolean renderPass2(short colix)

### isColixTranslucent

public static final boolean isColixTranslucent(short colix)

### getChangeableColixIndex

public static final short getChangeableColixIndex(short colix)

### getColixTranslucent3

public static final short getColixTranslucent3(short colix, boolean isTranslucent, float translucentLevel)

### copyColixTranslucency

public static final short copyColixTranslucency(short colixFrom, short colixTo)

### getColixTranslucencyFractional

public static float getColixTranslucencyFractional(short colix)

### getColixTranslucencyLabel

public static String getColixTranslucencyLabel(short colix)

### getColixTranslucencyLevel

public static final int getColixTranslucencyLevel(short colix)

### isTransparent

public static boolean isTransparent(short colix)

### getColixS

public static short getColixS(String colorName)

### getColixArray

public static short[] getColixArray(String colorNames)

### getHexCode

public static String getHexCode(short colix)

### getHexCodes

public static String getHexCodes(short[] colixes)

### getColixTranslucent

public static short getColixTranslucent(int argb)

### getBgContrast

public static short getBgContrast(int argb)