void outputColorNumbers ( Color color , float tint ) { PdfXConformanceImp . checkPDFXConformance ( writer , PdfXConformanceImp . PDFXKEY_COLOR , color ) ; int type = ExtendedColor . getType ( color ) ; switch ( type ) { case ExtendedColor . TYPE_RGB : content . append ( ( float ) ( color . getRed ( ) ) / 0xFF ) ; content . append ( ' ' ) ; content . append ( ( float ) ( color . getGreen ( ) ) / 0xFF ) ; content . append ( ' ' ) ; content . append ( ( float ) ( color . getBlue ( ) ) / 0xFF ) ; break ; case ExtendedColor . TYPE_GRAY : content . append ( ( ( GrayColor ) color ) . getGray ( ) ) ; break ; case ExtendedColor . TYPE_CMYK : { CMYKColor cmyk = ( CMYKColor ) color ; content . append ( cmyk . getCyan ( ) ) . append ( ' ' ) . append ( cmyk . getMagenta ( ) ) ; content . append ( ' ' ) . append ( cmyk . getYellow ( ) ) . append ( ' ' ) . append ( cmyk . getBlack ( ) ) ; break ; } case ExtendedColor . TYPE_SEPARATION : content . append ( tint ) ; break ; default : throw new RuntimeException ( "Invalid color type." ) ; } }
Outputs the color values to the content .