Package org.jmol.util

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 Details

  • Constructor Details

    • C

      public C()
  • Method Details

    • getColix

      public static short getColix(int argb)
    • allocateColix

      public static int allocateColix(int argb, boolean forceLast)
    • setLastGrey

      static void setLastGrey(int argb)
    • calcArgbsGreyscale

      static void calcArgbsGreyscale()
    • getArgbGreyscale

      public static final int getArgbGreyscale(short colix)
    • getColixO

      public static short getColixO(Object obj)
    • getTranslucentFlag

      private static int getTranslucentFlag(float translucentLevel)
    • 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)
    • 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)