This is color.new.h in view mode; [Download] [Up]
#ifndef COLORDEFS #define COLORDEFS typedef struct { float r, g, b; } Color; typedef struct { float r, g, b, a } ColorA; typedef struct { float r, g, b } CoRGB; typedef struct { float h, b, v } CoHSV; typedef struct { int type; union { CoRGB rgb; CoHSV hsv; } xxx; } ColorSys; float ColorMat[3][3]; ColorMat CO_XYZ_TO_RGB = { ... }; ColorMat CO_RGB_TO_XYZ = { ... }; /* Color database */ CoName( filename, name, c ) /* Color utilities */ CoPrint( c ) CoCopy( c0, c1 ) c1 = c0 CoFrom( c, r, g, b ) c = (r,g,b) CoAdd( c0, c1, c2 ) c2 = c0 + c1 CoSub( c0, c1, c2 ) c2 = c0 - c1 CoFilter( c0, c1, c2 ) c2 = c0 * c1 /* Color coordinate systems */ CoHSVtoRGB CoRGBtoHSV CoHSLtoRGB; CoRGBtoHSL; ... CoConvert( c1, c2, colormat ) /* Color Spectra */ #endif
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.