SGColor SG_EXPORT sgColorWeb(const char* name) { char bufn[256]; _sgColorPreprocess(bufn, sizeof(bufn), name); // special cases if(strcmp(bufn, "gray") == 0) return sgColor3ub(127, 127, 127); else if(strcmp(bufn, "grey") == 0) return sgColor3ub(127, 127, 127); else if(strcmp(bufn, "green") == 0) return sgColor3ub(0, 127, 0); else if(strcmp(bufn, "maroon") == 0) return sgColor3ub(127, 0, 0); else if(strcmp(bufn, "purple") == 0) return sgColor3ub(127, 0, 127); return _sgColorValue(bufn, 2); }
SGColor SG_EXPORT sgColorX11(const char* name) { char bufn[256]; _sgColorPreprocess(bufn, sizeof(bufn), name); // special cases if(strcmp(bufn, "gray") == 0) return sgColor3ub(190, 190, 190); else if(strcmp(bufn, "grey") == 0) return sgColor3ub(190, 190, 190); else if(strcmp(bufn, "green") == 0) return sgColor3ub(0, 255, 0); else if(strcmp(bufn, "maroon") == 0) return sgColor3ub(176, 48, 96); else if(strcmp(bufn, "purple") == 0) return sgColor3ub(160, 32, 240); return _sgColorValue(bufn, 1); }
SGColor SG_EXPORT sgColor3ubv(const SGubyte* rgb) { return sgColor3ub(rgb[0], rgb[1], rgb[2]); }
SGColor SG_CALL sgColor3ubp(const SGubyte* rgb) { return sgColor3ub(rgb[0], rgb[1], rgb[2]); }