| 1 |
/* Copyright (c) 1992 Regents of the University of California */
|
| 2 |
|
| 3 |
#ifndef lint
|
| 4 |
static char SCCSid[] = "$SunId$ LBL";
|
| 5 |
#endif
|
| 6 |
|
| 7 |
/*
|
| 8 |
* Convert Neutral File Format input to Radiance scene description.
|
| 9 |
*
|
| 10 |
* 12/9/90 Greg Ward
|
| 11 |
* 02/7/92 Peter Averkamp added X11(MTV)color names &
|
| 12 |
* fixed some lf's for direct import of MTV
|
| 13 |
* source files
|
| 14 |
*/
|
| 15 |
|
| 16 |
/******************************************************************
|
| 17 |
|
| 18 |
Since Eric Haines wrote such excellent documentation of his
|
| 19 |
Neutral File Format, I am just going to reprint it here with
|
| 20 |
my added comments in braces {}.
|
| 21 |
|
| 22 |
Neutral File Format (NFF), by Eric Haines
|
| 23 |
|
| 24 |
Draft document #1, 10/3/88
|
| 25 |
|
| 26 |
The NFF (Neutral File Format) is designed as a minimal scene description
|
| 27 |
language. The language was designed in order to test various rendering
|
| 28 |
algorithms and efficiency schemes. It is meant to describe the geometry and
|
| 29 |
basic surface characteristics of objects, the placement of lights, and the
|
| 30 |
viewing frustum for the eye. Some additional information is provided for
|
| 31 |
esthetic reasons (such as the color of the objects, which is not strictly
|
| 32 |
necessary for testing rendering algorithms).
|
| 33 |
|
| 34 |
Future enhancements include: circle and torus objects, spline surfaces
|
| 35 |
with trimming curves, directional lights, characteristics for positional
|
| 36 |
lights, CSG descriptions, and probably more by the time you read this.
|
| 37 |
Comments, suggestions, and criticisms are all welcome.
|
| 38 |
|
| 39 |
At present the NFF file format is used in conjunction with the SPD (Standard
|
| 40 |
Procedural Database) software, a package designed to create a variety of
|
| 41 |
databases for testing rendering schemes. The SPD package is available
|
| 42 |
from Netlib and via ftp from drizzle.cs.uoregon.edu. For more information
|
| 43 |
about SPD see "A Proposal for Standard Graphics Environments," IEEE Computer
|
| 44 |
Graphics and Applications, vol. 7, no. 11, November 1987, pp. 3-5.
|
| 45 |
|
| 46 |
By providing a minimal interface, NFF is meant to act as a simple format to
|
| 47 |
allow the programmer to quickly write filters to move from NFF to the
|
| 48 |
local file format. Presently the following entities are supported:
|
| 49 |
A simple perspective frustum
|
| 50 |
A positional (vs. directional) light source description
|
| 51 |
A background color description
|
| 52 |
A surface properties description
|
| 53 |
Polygon, polygonal patch, cylinder/cone, and sphere descriptions
|
| 54 |
|
| 55 |
Files are output as lines of text. For each entity, the first line
|
| 56 |
defines its type. The rest of the first line and possibly other lines
|
| 57 |
contain further information about the entity. Entities include:
|
| 58 |
|
| 59 |
"v" - viewing vectors and angles { optionally creates view file }
|
| 60 |
"l" - positional light location { it's there, but bad to use }
|
| 61 |
"b" - background color { ditto }
|
| 62 |
"f" - object material properties { this is flakey }
|
| 63 |
"c" - cone or cylinder primitive
|
| 64 |
"s" - sphere primitive
|
| 65 |
"p" - polygon primitive
|
| 66 |
"pp" - polygonal patch primitive { interpreted same as p for now }
|
| 67 |
|
| 68 |
These are explained in depth below: { see conversion routines }
|
| 69 |
|
| 70 |
***********************************************************************/
|
| 71 |
|
| 72 |
#include <stdio.h>
|
| 73 |
|
| 74 |
char *viewfile = NULL; /* view parameters file */
|
| 75 |
|
| 76 |
char *progname;
|
| 77 |
|
| 78 |
|
| 79 |
main(argc, argv) /* convert NFF file to Radiance */
|
| 80 |
int argc;
|
| 81 |
char *argv[];
|
| 82 |
{
|
| 83 |
int i;
|
| 84 |
|
| 85 |
progname = argv[0];
|
| 86 |
for (i = 1; i < argc; i++)
|
| 87 |
if (argc-i > 1 && !strcmp(argv[i], "-vf"))
|
| 88 |
viewfile = argv[++i];
|
| 89 |
else if (!strncmp(argv[i], "-h",2))
|
| 90 |
goto userr;
|
| 91 |
else
|
| 92 |
break;
|
| 93 |
if (argc-i > 1)
|
| 94 |
goto userr;
|
| 95 |
if (argc-i == 1 && freopen(argv[i], "r", stdin) == NULL) {
|
| 96 |
perror(argv[i]);
|
| 97 |
exit(1);
|
| 98 |
}
|
| 99 |
init();
|
| 100 |
nff2rad();
|
| 101 |
exit(0);
|
| 102 |
userr:
|
| 103 |
fprintf(stderr, "Usage: %s [-vf viewfile] [input]\n", progname);
|
| 104 |
exit(1);
|
| 105 |
}
|
| 106 |
|
| 107 |
|
| 108 |
init() /* spit out initial definitions */
|
| 109 |
{
|
| 110 |
printf("# File created by %s\n", progname);
|
| 111 |
printf("\nvoid light light\n");
|
| 112 |
printf("0\n0\n3 1 1 1\n");
|
| 113 |
printf("\nvoid plastic fill\n");
|
| 114 |
printf("0\n0\n5 .5 .5 .5 0 0\n");
|
| 115 |
}
|
| 116 |
|
| 117 |
|
| 118 |
nff2rad() /* convert NFF on stdin to Radiance on stdout */
|
| 119 |
{
|
| 120 |
register int c;
|
| 121 |
|
| 122 |
while ((c = getchar()) != EOF)
|
| 123 |
switch (c) {
|
| 124 |
case ' ': /* white space */
|
| 125 |
case '\t':
|
| 126 |
case '\n':
|
| 127 |
case '\f':
|
| 128 |
case '\r':
|
| 129 |
continue;
|
| 130 |
case '#': /* comment */
|
| 131 |
comment();
|
| 132 |
break;
|
| 133 |
case 'v': /* view point */
|
| 134 |
view();
|
| 135 |
break;
|
| 136 |
case 'l': /* light source */
|
| 137 |
light();
|
| 138 |
break;
|
| 139 |
case 'b': /* background color */
|
| 140 |
background();
|
| 141 |
break;
|
| 142 |
case 'f': /* fill material */
|
| 143 |
fill();
|
| 144 |
break;
|
| 145 |
case 'c': /* cylinder or cone */
|
| 146 |
cone();
|
| 147 |
break;
|
| 148 |
case 's': /* sphere */
|
| 149 |
sphere();
|
| 150 |
break;
|
| 151 |
case 'p': /* polygon or patch */
|
| 152 |
poly();
|
| 153 |
break;
|
| 154 |
default: /* unknown */
|
| 155 |
fprintf(stderr, "%c: unknown NFF primitive\n", c);
|
| 156 |
exit(1);
|
| 157 |
}
|
| 158 |
}
|
| 159 |
|
| 160 |
|
| 161 |
/*******************************************
|
| 162 |
|
| 163 |
Comment. Description:
|
| 164 |
"#" [ string ]
|
| 165 |
|
| 166 |
Format:
|
| 167 |
# [ string ]
|
| 168 |
|
| 169 |
As soon as a "#" character is detected, the rest of the line is considered
|
| 170 |
a comment.
|
| 171 |
|
| 172 |
******************/
|
| 173 |
|
| 174 |
comment()
|
| 175 |
{
|
| 176 |
register int c;
|
| 177 |
|
| 178 |
putchar('#');
|
| 179 |
while ((c = getchar()) != EOF) {
|
| 180 |
putchar(c);
|
| 181 |
if (c == '\n')
|
| 182 |
break;
|
| 183 |
}
|
| 184 |
}
|
| 185 |
|
| 186 |
|
| 187 |
/***************************************************
|
| 188 |
|
| 189 |
Viewpoint location. Description:
|
| 190 |
"v"
|
| 191 |
"from" Fx Fy Fz
|
| 192 |
"at" Ax Ay Az
|
| 193 |
"up" Ux Uy Uz
|
| 194 |
"angle" angle
|
| 195 |
"hither" hither
|
| 196 |
"resolution" xres yres
|
| 197 |
|
| 198 |
Format:
|
| 199 |
|
| 200 |
v
|
| 201 |
from %g %g %g
|
| 202 |
at %g %g %g
|
| 203 |
up %g %g %g
|
| 204 |
angle %g
|
| 205 |
hither %g
|
| 206 |
resolution %d %d
|
| 207 |
|
| 208 |
The parameters are:
|
| 209 |
|
| 210 |
From: the eye location in XYZ.
|
| 211 |
At: a position to be at the center of the image, in XYZ world
|
| 212 |
coordinates. A.k.a. "lookat".
|
| 213 |
Up: a vector defining which direction is up, as an XYZ vector.
|
| 214 |
Angle: in degrees, defined as from the center of top pixel row to
|
| 215 |
bottom pixel row and left column to right column.
|
| 216 |
Resolution: in pixels, in x and in y.
|
| 217 |
|
| 218 |
Note that no assumptions are made about normalizing the data (e.g. the
|
| 219 |
from-at distance does not have to be 1). Also, vectors are not
|
| 220 |
required to be perpendicular to each other.
|
| 221 |
|
| 222 |
For all databases some viewing parameters are always the same:
|
| 223 |
Yon is "at infinity."
|
| 224 |
Aspect ratio is 1.0.
|
| 225 |
|
| 226 |
A view entity must be defined before any objects are defined (this
|
| 227 |
requirement is so that NFF files can be used by hidden surface machines).
|
| 228 |
|
| 229 |
***************/
|
| 230 |
|
| 231 |
view()
|
| 232 |
{
|
| 233 |
static FILE *fp = NULL;
|
| 234 |
float from[3], at[3], up[3], angle;
|
| 235 |
|
| 236 |
if (scanf(" from %f %f %f", &from[0], &from[1], &from[2]) != 3)
|
| 237 |
goto fmterr;
|
| 238 |
if (scanf(" at %f %f %f", &at[0], &at[1], &at[2]) != 3)
|
| 239 |
goto fmterr;
|
| 240 |
if (scanf(" up %f %f %f", &up[0], &up[1], &up[2]) != 3)
|
| 241 |
goto fmterr;
|
| 242 |
if (scanf(" angle %f", &angle) != 1)
|
| 243 |
goto fmterr;
|
| 244 |
scanf(" hither %*f");
|
| 245 |
scanf(" resolution %*d %*d");
|
| 246 |
if (viewfile != NULL) {
|
| 247 |
if (fp == NULL && (fp = fopen(viewfile, "a")) == NULL) {
|
| 248 |
perror(viewfile);
|
| 249 |
exit(1);
|
| 250 |
}
|
| 251 |
fprintf(fp,
|
| 252 |
"VIEW= -vp %g %g %g -vd %g %g %g -vu %g %g %g -vh %g -vv %g\n",
|
| 253 |
from[0], from[1], from[2],
|
| 254 |
at[0]-from[0], at[1]-from[1], at[2]-from[2],
|
| 255 |
up[0], up[1], up[2],
|
| 256 |
angle, angle);
|
| 257 |
}
|
| 258 |
return;
|
| 259 |
fmterr:
|
| 260 |
fprintf(stderr, "%s: view syntax error\n", progname);
|
| 261 |
exit(1);
|
| 262 |
}
|
| 263 |
|
| 264 |
|
| 265 |
/********************************
|
| 266 |
|
| 267 |
Positional light. A light is defined by XYZ position. Description:
|
| 268 |
"l" X Y Z
|
| 269 |
|
| 270 |
Format:
|
| 271 |
l %g %g %g
|
| 272 |
|
| 273 |
All light entities must be defined before any objects are defined (this
|
| 274 |
requirement is so that NFF files can be used by hidden surface machines).
|
| 275 |
Lights have a non-zero intensity of no particular value [this definition
|
| 276 |
may change soon, with the addition of an intensity and/or color].
|
| 277 |
|
| 278 |
**************************/
|
| 279 |
|
| 280 |
light()
|
| 281 |
{
|
| 282 |
static int nlights = 0;
|
| 283 |
register int c;
|
| 284 |
float x, y, z;
|
| 285 |
|
| 286 |
if (scanf("%f %f %f",&x, &y, &z) != 3) {
|
| 287 |
fprintf(stderr, "%s: light source syntax error\n", progname);
|
| 288 |
exit(1);
|
| 289 |
}
|
| 290 |
while ((c = getchar()) != EOF && c != '\n')
|
| 291 |
;
|
| 292 |
printf("\nlight sphere l%d \n", ++nlights);
|
| 293 |
printf("0\n0\n4 %g %g %g 1\n", x, y, z);
|
| 294 |
}
|
| 295 |
|
| 296 |
|
| 297 |
/**************************************************
|
| 298 |
|
| 299 |
Background color. A color is simply RGB with values between 0 and 1:
|
| 300 |
"b" R G B
|
| 301 |
|
| 302 |
Format:
|
| 303 |
b %g %g %g
|
| 304 |
|
| 305 |
If no background color is set, assume RGB = {0,0,0}.
|
| 306 |
|
| 307 |
********************/
|
| 308 |
|
| 309 |
background()
|
| 310 |
{
|
| 311 |
float r, g, b;
|
| 312 |
char colname[50];
|
| 313 |
double cvec[3];
|
| 314 |
|
| 315 |
if (scanf("%s", colname) != 1) {
|
| 316 |
fprintf(stderr,"%s: background syntax error\n",progname);exit(1);
|
| 317 |
}
|
| 318 |
if(LookupColorByName(colname,cvec)==1){
|
| 319 |
r=cvec[0];g=cvec[1];b=cvec[2];
|
| 320 |
}else{
|
| 321 |
if(sscanf(colname,"%f",&r)!=1 ||
|
| 322 |
scanf("%f %f", &g, &b) !=2) {
|
| 323 |
fprintf(stderr, "%s: background syntax error\n", progname);
|
| 324 |
exit(1);
|
| 325 |
}
|
| 326 |
}
|
| 327 |
printf("\nvoid glow backg_color\n");
|
| 328 |
printf("0\n0\n4 %g %g %g 0\n", r, g, b);
|
| 329 |
printf("\nbackg_color source background\n");
|
| 330 |
printf("0\n0\n4 0 0 1 360\n");
|
| 331 |
}
|
| 332 |
|
| 333 |
|
| 334 |
/****************************************************
|
| 335 |
|
| 336 |
Fill color and shading parameters. Description:
|
| 337 |
"f" red green blue Kd Ks Shine T index_of_refraction
|
| 338 |
|
| 339 |
Format:
|
| 340 |
f %g %g %g %g %g %g %g %g
|
| 341 |
|
| 342 |
RGB is in terms of 0.0 to 1.0.
|
| 343 |
|
| 344 |
Kd is the diffuse component, Ks the specular, Shine is the Phong cosine
|
| 345 |
power for highlights, T is transmittance (fraction of light passed per
|
| 346 |
unit). Usually, 0 <= Kd <= 1 and 0 <= Ks <= 1, though it is not required
|
| 347 |
that Kd + Ks == 1. Note that transmitting objects ( T > 0 ) are considered
|
| 348 |
to have two sides for algorithms that need these (normally objects have
|
| 349 |
one side).
|
| 350 |
|
| 351 |
The fill color is used to color the objects following it until a new color
|
| 352 |
is assigned.
|
| 353 |
|
| 354 |
*********************/
|
| 355 |
|
| 356 |
fill()
|
| 357 |
{
|
| 358 |
float r, g, b, d, s, p, t, n;
|
| 359 |
char colname[50];
|
| 360 |
double cvec[3];
|
| 361 |
|
| 362 |
if (scanf("%s", colname) != 1) {
|
| 363 |
fprintf(stderr,"%s: fill syntax error\n",progname);exit(1);
|
| 364 |
}
|
| 365 |
if(LookupColorByName(colname,cvec)==1){
|
| 366 |
r=cvec[0];g=cvec[1];b=cvec[2];
|
| 367 |
}else{
|
| 368 |
if(sscanf(colname,"%f",&r)!=1 ||
|
| 369 |
scanf("%f %f", &g, &b) !=2) {
|
| 370 |
fprintf(stderr, "%s: fill syntax error\n", progname);
|
| 371 |
exit(1);
|
| 372 |
}
|
| 373 |
}
|
| 374 |
if (scanf("%f %f %f %f %f", &d, &s, &p, &t, &n) != 5) {
|
| 375 |
fprintf(stderr, "%s: fill material syntax error\n", progname);
|
| 376 |
exit(1);
|
| 377 |
}
|
| 378 |
d /= 1.-s-t;
|
| 379 |
r *= d;
|
| 380 |
g *= d;
|
| 381 |
b *= d;
|
| 382 |
if (p > 1.)
|
| 383 |
p = 1./p;
|
| 384 |
if (t > .001) { /* has transmission */
|
| 385 |
printf("\nvoid trans fill\n");
|
| 386 |
printf("0\n0\n7 %g %g %g %g 0 %g 1\n", r, g, b, s, t);
|
| 387 |
} else { /* no transmission */
|
| 388 |
printf("\nvoid plastic fill\n");
|
| 389 |
printf("0\n0\n5 %g %g %g %g %g\n", r, g, b, s, p);
|
| 390 |
}
|
| 391 |
}
|
| 392 |
|
| 393 |
|
| 394 |
/*****************************************************
|
| 395 |
|
| 396 |
Cylinder or cone. A cylinder is defined as having a radius and an axis
|
| 397 |
defined by two points, which also define the top and bottom edge of the
|
| 398 |
cylinder. A cone is defined similarly, the difference being that the apex
|
| 399 |
and base radii are different. The apex radius is defined as being smaller
|
| 400 |
than the base radius. Note that the surface exists without endcaps. The
|
| 401 |
cone or cylinder description:
|
| 402 |
|
| 403 |
"c"
|
| 404 |
base.x base.y base.z base_radius
|
| 405 |
apex.x apex.y apex.z apex_radius
|
| 406 |
|
| 407 |
Format:
|
| 408 |
c
|
| 409 |
%g %g %g %g
|
| 410 |
%g %g %g %g
|
| 411 |
|
| 412 |
A negative value for both radii means that only the inside of the object is
|
| 413 |
visible (objects are normally considered one sided, with the outside
|
| 414 |
visible). Note that the base and apex cannot be coincident for a cylinder
|
| 415 |
or cone.
|
| 416 |
|
| 417 |
************************/
|
| 418 |
|
| 419 |
cone()
|
| 420 |
{
|
| 421 |
static int ncs = 0;
|
| 422 |
int invert;
|
| 423 |
float x0, y0, z0, x1, y1, z1, r0, r1;
|
| 424 |
|
| 425 |
if (scanf("%f %f %f %f %f %f %f %f", &x0, &y0, &z0, &r0,
|
| 426 |
&x1, &y1, &z1, &r1) != 8) {
|
| 427 |
fprintf(stderr, "%s: cylinder or cone syntax error\n",
|
| 428 |
progname);
|
| 429 |
exit(1);
|
| 430 |
}
|
| 431 |
if (invert = r0 < 0.) {
|
| 432 |
r0 = -r0;
|
| 433 |
r1 = -r1;
|
| 434 |
}
|
| 435 |
if (r0-r1 < .001 && r1-r0 < .001) { /* cylinder */
|
| 436 |
printf("\nfill %s c%d \n", invert?"tube":"cylinder", ++ncs);
|
| 437 |
printf("0\n0\n7\n");
|
| 438 |
printf("\t%g\t%g\t%g\n", x0, y0, z0);
|
| 439 |
printf("\t%g\t%g\t%g\n", x1, y1, z1);
|
| 440 |
printf("\t%g\n", r0);
|
| 441 |
} else { /* cone */
|
| 442 |
printf("\nfill %s c%d \n", invert?"cup":"cone", ++ncs);
|
| 443 |
printf("0\n0\n8\n");
|
| 444 |
printf("\t%g\t%g\t%g\n", x0, y0, z0);
|
| 445 |
printf("\t%g\t%g\t%g\n", x1, y1, z1);
|
| 446 |
printf("\t%g\t%g\n", r0, r1);
|
| 447 |
}
|
| 448 |
}
|
| 449 |
|
| 450 |
|
| 451 |
/*****************************************
|
| 452 |
|
| 453 |
Sphere. A sphere is defined by a radius and center position:
|
| 454 |
"s" center.x center.y center.z radius
|
| 455 |
|
| 456 |
Format:
|
| 457 |
s %g %g %g %g
|
| 458 |
|
| 459 |
If the radius is negative, then only the sphere's inside is visible
|
| 460 |
(objects are normally considered one sided, with the outside visible).
|
| 461 |
|
| 462 |
******************/
|
| 463 |
|
| 464 |
sphere()
|
| 465 |
{
|
| 466 |
static int nspheres = 0;
|
| 467 |
float x, y, z, r;
|
| 468 |
|
| 469 |
if (scanf("%f %f %f %f", &x, &y, &z, &r) != 4) {
|
| 470 |
fprintf(stderr, "%s: sphere syntax error\n", progname);
|
| 471 |
exit(1);
|
| 472 |
}
|
| 473 |
if (r < 0.) {
|
| 474 |
printf("\nfill bubble s%d \n", ++nspheres);
|
| 475 |
printf("0\n0\n4 %g %g %g %g\n", x, y, z, -r);
|
| 476 |
} else {
|
| 477 |
printf("\nfill sphere s%d \n", ++nspheres);
|
| 478 |
printf("0\n0\n4 %g %g %g %g\n", x, y, z, r);
|
| 479 |
}
|
| 480 |
}
|
| 481 |
|
| 482 |
|
| 483 |
/*********************************************
|
| 484 |
|
| 485 |
Polygon. A polygon is defined by a set of vertices. With these databases,
|
| 486 |
a polygon is defined to have all points coplanar. A polygon has only
|
| 487 |
one side, with the order of the vertices being counterclockwise as you
|
| 488 |
face the polygon (right-handed coordinate system). The first two edges
|
| 489 |
must form a non-zero convex angle, so that the normal and side visibility
|
| 490 |
can be determined. Description:
|
| 491 |
|
| 492 |
"p" total_vertices
|
| 493 |
vert1.x vert1.y vert1.z
|
| 494 |
[etc. for total_vertices vertices]
|
| 495 |
|
| 496 |
Format:
|
| 497 |
p %d
|
| 498 |
[ %g %g %g ] <-- for total_vertices vertices
|
| 499 |
|
| 500 |
--------
|
| 501 |
|
| 502 |
Polygonal patch. A patch is defined by a set of vertices and their normals.
|
| 503 |
With these databases, a patch is defined to have all points coplanar.
|
| 504 |
A patch has only one side, with the order of the vertices being
|
| 505 |
counterclockwise as you face the patch (right-handed coordinate system).
|
| 506 |
The first two edges must form a non-zero convex angle, so that the normal
|
| 507 |
and side visibility can be determined. Description:
|
| 508 |
|
| 509 |
"pp" total_vertices
|
| 510 |
vert1.x vert1.y vert1.z norm1.x norm1.y norm1.z
|
| 511 |
[etc. for total_vertices vertices]
|
| 512 |
|
| 513 |
Format:
|
| 514 |
pp %d
|
| 515 |
[ %g %g %g %g %g %g ] <-- for total_vertices vertices
|
| 516 |
|
| 517 |
*******************/
|
| 518 |
|
| 519 |
poly()
|
| 520 |
{
|
| 521 |
static int npolys = 0;
|
| 522 |
int ispatch;
|
| 523 |
int nverts;
|
| 524 |
float x, y, z;
|
| 525 |
|
| 526 |
ispatch = getchar();
|
| 527 |
if (ispatch != 'p') {
|
| 528 |
ungetc(ispatch, stdin);
|
| 529 |
ispatch = 0;
|
| 530 |
}
|
| 531 |
if (scanf("%d", &nverts) != 1)
|
| 532 |
goto fmterr;
|
| 533 |
printf("\nfill polygon p%d \n", ++npolys);
|
| 534 |
printf("0\n0\n%d\n", 3*nverts);
|
| 535 |
while (nverts-- > 0) {
|
| 536 |
if (scanf("%f %f %f", &x, &y, &z) != 3)
|
| 537 |
goto fmterr;
|
| 538 |
if (ispatch)
|
| 539 |
scanf("%*f %*f %*f");
|
| 540 |
printf("\t%g\t%g\t%g\n", x, y, z);
|
| 541 |
}
|
| 542 |
return;
|
| 543 |
fmterr:
|
| 544 |
fprintf(stderr, "%s: polygon or patch syntax error\n", progname);
|
| 545 |
exit(1);
|
| 546 |
}
|
| 547 |
/***********************************************************************
|
| 548 |
* $Author: markv $ (Mark VandeWettering, drizzle.cs.uoregon.edu)
|
| 549 |
* $Revision: 1.2 $
|
| 550 |
* $Date: 88/09/12 12:53:47 $
|
| 551 |
* $Log: color.c,v $
|
| 552 |
* Revision 1.2 88/09/12 12:53:47 markv
|
| 553 |
* Fixed problem in LookupColorbyName, had return ; and return(0).
|
| 554 |
* [ Thank you lint! ]
|
| 555 |
*
|
| 556 |
* Revision 1.1 88/09/11 11:00:37 markv
|
| 557 |
* Initial revision
|
| 558 |
*
|
| 559 |
* Peter Averkamp 92/02/01
|
| 560 |
* added complete X11R5 rgb.txt-table, hacked standalone version
|
| 561 |
* for nff2rad
|
| 562 |
*
|
| 563 |
***********************************************************************/
|
| 564 |
|
| 565 |
typedef double Flt ;
|
| 566 |
typedef Flt Vec[3] ;
|
| 567 |
typedef Vec Point ;
|
| 568 |
typedef Vec Color ;
|
| 569 |
|
| 570 |
#define VecCopy(a,b) (b)[0]=(a)[0];(b)[1]=(a)[1];(b)[2]=(a)[2];
|
| 571 |
#define NCOLORS (738)
|
| 572 |
|
| 573 |
typedef struct t_color_entry {
|
| 574 |
char * ce_name ;
|
| 575 |
Vec ce_color ;
|
| 576 |
} ColorEntry ;
|
| 577 |
|
| 578 |
#define LESS_THAN -1
|
| 579 |
#define GREATER_THAN 1
|
| 580 |
#define EQUAL_TO 0
|
| 581 |
|
| 582 |
/*
|
| 583 |
* Note: These colors must be in sorted order, because we binary search
|
| 584 |
* for them.
|
| 585 |
*
|
| 586 |
* They were swiped from the X-11 distribution. Sorry....
|
| 587 |
*/
|
| 588 |
|
| 589 |
ColorEntry Colors[] = {
|
| 590 |
"AliceBlue", {0.941176 , 0.972549 , 1.000000 },
|
| 591 |
"AntiqueWhite", {0.980392 , 0.921569 , 0.843137 },
|
| 592 |
"AntiqueWhite1", {1.000000 , 0.937255 , 0.858824 },
|
| 593 |
"AntiqueWhite2", {0.933333 , 0.874510 , 0.800000 },
|
| 594 |
"AntiqueWhite3", {0.803922 , 0.752941 , 0.690196 },
|
| 595 |
"AntiqueWhite4", {0.545098 , 0.513725 , 0.470588 },
|
| 596 |
"BlanchedAlmond", {1.000000 , 0.921569 , 0.803922 },
|
| 597 |
"BlueViolet", {0.541176 , 0.168627 , 0.886275 },
|
| 598 |
"CadetBlue", {0.372549 , 0.619608 , 0.627451 },
|
| 599 |
"CadetBlue1", {0.596078 , 0.960784 , 1.000000 },
|
| 600 |
"CadetBlue2", {0.556863 , 0.898039 , 0.933333 },
|
| 601 |
"CadetBlue3", {0.478431 , 0.772549 , 0.803922 },
|
| 602 |
"CadetBlue4", {0.325490 , 0.525490 , 0.545098 },
|
| 603 |
"CornflowerBlue", {0.392157 , 0.584314 , 0.929412 },
|
| 604 |
"DarkGoldenrod", {0.721569 , 0.525490 , 0.043137 },
|
| 605 |
"DarkGoldenrod1", {1.000000 , 0.725490 , 0.058824 },
|
| 606 |
"DarkGoldenrod2", {0.933333 , 0.678431 , 0.054902 },
|
| 607 |
"DarkGoldenrod3", {0.803922 , 0.584314 , 0.047059 },
|
| 608 |
"DarkGoldenrod4", {0.545098 , 0.396078 , 0.031373 },
|
| 609 |
"DarkGreen", {0.000000 , 0.392157 , 0.000000 },
|
| 610 |
"DarkKhaki", {0.741176 , 0.717647 , 0.419608 },
|
| 611 |
"DarkOliveGreen", {0.333333 , 0.419608 , 0.184314 },
|
| 612 |
"DarkOliveGreen1", {0.792157 , 1.000000 , 0.439216 },
|
| 613 |
"DarkOliveGreen2", {0.737255 , 0.933333 , 0.407843 },
|
| 614 |
"DarkOliveGreen3", {0.635294 , 0.803922 , 0.352941 },
|
| 615 |
"DarkOliveGreen4", {0.431373 , 0.545098 , 0.239216 },
|
| 616 |
"DarkOrange", {1.000000 , 0.549020 , 0.000000 },
|
| 617 |
"DarkOrange1", {1.000000 , 0.498039 , 0.000000 },
|
| 618 |
"DarkOrange2", {0.933333 , 0.462745 , 0.000000 },
|
| 619 |
"DarkOrange3", {0.803922 , 0.400000 , 0.000000 },
|
| 620 |
"DarkOrange4", {0.545098 , 0.270588 , 0.000000 },
|
| 621 |
"DarkOrchid", {0.600000 , 0.196078 , 0.800000 },
|
| 622 |
"DarkOrchid1", {0.749020 , 0.243137 , 1.000000 },
|
| 623 |
"DarkOrchid2", {0.698039 , 0.227451 , 0.933333 },
|
| 624 |
"DarkOrchid3", {0.603922 , 0.196078 , 0.803922 },
|
| 625 |
"DarkOrchid4", {0.407843 , 0.133333 , 0.545098 },
|
| 626 |
"DarkSalmon", {0.913725 , 0.588235 , 0.478431 },
|
| 627 |
"DarkSeaGreen", {0.560784 , 0.737255 , 0.560784 },
|
| 628 |
"DarkSeaGreen1", {0.756863 , 1.000000 , 0.756863 },
|
| 629 |
"DarkSeaGreen2", {0.705882 , 0.933333 , 0.705882 },
|
| 630 |
"DarkSeaGreen3", {0.607843 , 0.803922 , 0.607843 },
|
| 631 |
"DarkSeaGreen4", {0.411765 , 0.545098 , 0.411765 },
|
| 632 |
"DarkSlateBlue", {0.282353 , 0.239216 , 0.545098 },
|
| 633 |
"DarkSlateGray", {0.184314 , 0.309804 , 0.309804 },
|
| 634 |
"DarkSlateGray1", {0.592157 , 1.000000 , 1.000000 },
|
| 635 |
"DarkSlateGray2", {0.552941 , 0.933333 , 0.933333 },
|
| 636 |
"DarkSlateGray3", {0.474510 , 0.803922 , 0.803922 },
|
| 637 |
"DarkSlateGray4", {0.321569 , 0.545098 , 0.545098 },
|
| 638 |
"DarkSlateGrey", {0.184314 , 0.309804 , 0.309804 },
|
| 639 |
"DarkTurquoise", {0.000000 , 0.807843 , 0.819608 },
|
| 640 |
"DarkViolet", {0.580392 , 0.000000 , 0.827451 },
|
| 641 |
"DeepPink", {1.000000 , 0.078431 , 0.576471 },
|
| 642 |
"DeepPink1", {1.000000 , 0.078431 , 0.576471 },
|
| 643 |
"DeepPink2", {0.933333 , 0.070588 , 0.537255 },
|
| 644 |
"DeepPink3", {0.803922 , 0.062745 , 0.462745 },
|
| 645 |
"DeepPink4", {0.545098 , 0.039216 , 0.313725 },
|
| 646 |
"DeepSkyBlue", {0.000000 , 0.749020 , 1.000000 },
|
| 647 |
"DeepSkyBlue1", {0.000000 , 0.749020 , 1.000000 },
|
| 648 |
"DeepSkyBlue2", {0.000000 , 0.698039 , 0.933333 },
|
| 649 |
"DeepSkyBlue3", {0.000000 , 0.603922 , 0.803922 },
|
| 650 |
"DeepSkyBlue4", {0.000000 , 0.407843 , 0.545098 },
|
| 651 |
"DimGray", {0.411765 , 0.411765 , 0.411765 },
|
| 652 |
"DimGrey", {0.411765 , 0.411765 , 0.411765 },
|
| 653 |
"DodgerBlue", {0.117647 , 0.564706 , 1.000000 },
|
| 654 |
"DodgerBlue1", {0.117647 , 0.564706 , 1.000000 },
|
| 655 |
"DodgerBlue2", {0.109804 , 0.525490 , 0.933333 },
|
| 656 |
"DodgerBlue3", {0.094118 , 0.454902 , 0.803922 },
|
| 657 |
"DodgerBlue4", {0.062745 , 0.305882 , 0.545098 },
|
| 658 |
"FloralWhite", {1.000000 , 0.980392 , 0.941176 },
|
| 659 |
"ForestGreen", {0.133333 , 0.545098 , 0.133333 },
|
| 660 |
"GhostWhite", {0.972549 , 0.972549 , 1.000000 },
|
| 661 |
"GreenYellow", {0.678431 , 1.000000 , 0.184314 },
|
| 662 |
"HotPink", {1.000000 , 0.411765 , 0.705882 },
|
| 663 |
"HotPink1", {1.000000 , 0.431373 , 0.705882 },
|
| 664 |
"HotPink2", {0.933333 , 0.415686 , 0.654902 },
|
| 665 |
"HotPink3", {0.803922 , 0.376471 , 0.564706 },
|
| 666 |
"HotPink4", {0.545098 , 0.227451 , 0.384314 },
|
| 667 |
"IndianRed", {0.803922 , 0.360784 , 0.360784 },
|
| 668 |
"IndianRed1", {1.000000 , 0.415686 , 0.415686 },
|
| 669 |
"IndianRed2", {0.933333 , 0.388235 , 0.388235 },
|
| 670 |
"IndianRed3", {0.803922 , 0.333333 , 0.333333 },
|
| 671 |
"IndianRed4", {0.545098 , 0.227451 , 0.227451 },
|
| 672 |
"LavenderBlush", {1.000000 , 0.941176 , 0.960784 },
|
| 673 |
"LavenderBlush1", {1.000000 , 0.941176 , 0.960784 },
|
| 674 |
"LavenderBlush2", {0.933333 , 0.878431 , 0.898039 },
|
| 675 |
"LavenderBlush3", {0.803922 , 0.756863 , 0.772549 },
|
| 676 |
"LavenderBlush4", {0.545098 , 0.513725 , 0.525490 },
|
| 677 |
"LawnGreen", {0.486275 , 0.988235 , 0.000000 },
|
| 678 |
"LemonChiffon", {1.000000 , 0.980392 , 0.803922 },
|
| 679 |
"LemonChiffon1", {1.000000 , 0.980392 , 0.803922 },
|
| 680 |
"LemonChiffon2", {0.933333 , 0.913725 , 0.749020 },
|
| 681 |
"LemonChiffon3", {0.803922 , 0.788235 , 0.647059 },
|
| 682 |
"LemonChiffon4", {0.545098 , 0.537255 , 0.439216 },
|
| 683 |
"LightBlue", {0.678431 , 0.847059 , 0.901961 },
|
| 684 |
"LightBlue1", {0.749020 , 0.937255 , 1.000000 },
|
| 685 |
"LightBlue2", {0.698039 , 0.874510 , 0.933333 },
|
| 686 |
"LightBlue3", {0.603922 , 0.752941 , 0.803922 },
|
| 687 |
"LightBlue4", {0.407843 , 0.513725 , 0.545098 },
|
| 688 |
"LightCoral", {0.941176 , 0.501961 , 0.501961 },
|
| 689 |
"LightCyan", {0.878431 , 1.000000 , 1.000000 },
|
| 690 |
"LightCyan1", {0.878431 , 1.000000 , 1.000000 },
|
| 691 |
"LightCyan2", {0.819608 , 0.933333 , 0.933333 },
|
| 692 |
"LightCyan3", {0.705882 , 0.803922 , 0.803922 },
|
| 693 |
"LightCyan4", {0.478431 , 0.545098 , 0.545098 },
|
| 694 |
"LightGoldenrod", {0.933333 , 0.866667 , 0.509804 },
|
| 695 |
"LightGoldenrod1", {1.000000 , 0.925490 , 0.545098 },
|
| 696 |
"LightGoldenrod2", {0.933333 , 0.862745 , 0.509804 },
|
| 697 |
"LightGoldenrod3", {0.803922 , 0.745098 , 0.439216 },
|
| 698 |
"LightGoldenrod4", {0.545098 , 0.505882 , 0.298039 },
|
| 699 |
"LightGoldenrodYellow", {0.980392 , 0.980392 , 0.823529 },
|
| 700 |
"LightGray", {0.827451 , 0.827451 , 0.827451 },
|
| 701 |
"LightGrey", {0.827451 , 0.827451 , 0.827451 },
|
| 702 |
"LightPink", {1.000000 , 0.713725 , 0.756863 },
|
| 703 |
"LightPink1", {1.000000 , 0.682353 , 0.725490 },
|
| 704 |
"LightPink2", {0.933333 , 0.635294 , 0.678431 },
|
| 705 |
"LightPink3", {0.803922 , 0.549020 , 0.584314 },
|
| 706 |
"LightPink4", {0.545098 , 0.372549 , 0.396078 },
|
| 707 |
"LightSalmon", {1.000000 , 0.627451 , 0.478431 },
|
| 708 |
"LightSalmon1", {1.000000 , 0.627451 , 0.478431 },
|
| 709 |
"LightSalmon2", {0.933333 , 0.584314 , 0.447059 },
|
| 710 |
"LightSalmon3", {0.803922 , 0.505882 , 0.384314 },
|
| 711 |
"LightSalmon4", {0.545098 , 0.341176 , 0.258824 },
|
| 712 |
"LightSeaGreen", {0.125490 , 0.698039 , 0.666667 },
|
| 713 |
"LightSkyBlue", {0.529412 , 0.807843 , 0.980392 },
|
| 714 |
"LightSkyBlue1", {0.690196 , 0.886275 , 1.000000 },
|
| 715 |
"LightSkyBlue2", {0.643137 , 0.827451 , 0.933333 },
|
| 716 |
"LightSkyBlue3", {0.552941 , 0.713725 , 0.803922 },
|
| 717 |
"LightSkyBlue4", {0.376471 , 0.482353 , 0.545098 },
|
| 718 |
"LightSlateBlue", {0.517647 , 0.439216 , 1.000000 },
|
| 719 |
"LightSlateGray", {0.466667 , 0.533333 , 0.600000 },
|
| 720 |
"LightSlateGrey", {0.466667 , 0.533333 , 0.600000 },
|
| 721 |
"LightSteelBlue", {0.690196 , 0.768627 , 0.870588 },
|
| 722 |
"LightSteelBlue1", {0.792157 , 0.882353 , 1.000000 },
|
| 723 |
"LightSteelBlue2", {0.737255 , 0.823529 , 0.933333 },
|
| 724 |
"LightSteelBlue3", {0.635294 , 0.709804 , 0.803922 },
|
| 725 |
"LightSteelBlue4", {0.431373 , 0.482353 , 0.545098 },
|
| 726 |
"LightYellow", {1.000000 , 1.000000 , 0.878431 },
|
| 727 |
"LightYellow1", {1.000000 , 1.000000 , 0.878431 },
|
| 728 |
"LightYellow2", {0.933333 , 0.933333 , 0.819608 },
|
| 729 |
"LightYellow3", {0.803922 , 0.803922 , 0.705882 },
|
| 730 |
"LightYellow4", {0.545098 , 0.545098 , 0.478431 },
|
| 731 |
"LimeGreen", {0.196078 , 0.803922 , 0.196078 },
|
| 732 |
"MediumAquamarine", {0.400000 , 0.803922 , 0.666667 },
|
| 733 |
"MediumBlue", {0.000000 , 0.000000 , 0.803922 },
|
| 734 |
"MediumOrchid", {0.729412 , 0.333333 , 0.827451 },
|
| 735 |
"MediumOrchid1", {0.878431 , 0.400000 , 1.000000 },
|
| 736 |
"MediumOrchid2", {0.819608 , 0.372549 , 0.933333 },
|
| 737 |
"MediumOrchid3", {0.705882 , 0.321569 , 0.803922 },
|
| 738 |
"MediumOrchid4", {0.478431 , 0.215686 , 0.545098 },
|
| 739 |
"MediumPurple", {0.576471 , 0.439216 , 0.858824 },
|
| 740 |
"MediumPurple1", {0.670588 , 0.509804 , 1.000000 },
|
| 741 |
"MediumPurple2", {0.623529 , 0.474510 , 0.933333 },
|
| 742 |
"MediumPurple3", {0.537255 , 0.407843 , 0.803922 },
|
| 743 |
"MediumPurple4", {0.364706 , 0.278431 , 0.545098 },
|
| 744 |
"MediumSeaGreen", {0.235294 , 0.701961 , 0.443137 },
|
| 745 |
"MediumSlateBlue", {0.482353 , 0.407843 , 0.933333 },
|
| 746 |
"MediumSpringGreen", {0.000000 , 0.980392 , 0.603922 },
|
| 747 |
"MediumTurquoise", {0.282353 , 0.819608 , 0.800000 },
|
| 748 |
"MediumVioletRed", {0.780392 , 0.082353 , 0.521569 },
|
| 749 |
"MidnightBlue", {0.098039 , 0.098039 , 0.439216 },
|
| 750 |
"MintCream", {0.960784 , 1.000000 , 0.980392 },
|
| 751 |
"MistyRose", {1.000000 , 0.894118 , 0.882353 },
|
| 752 |
"MistyRose1", {1.000000 , 0.894118 , 0.882353 },
|
| 753 |
"MistyRose2", {0.933333 , 0.835294 , 0.823529 },
|
| 754 |
"MistyRose3", {0.803922 , 0.717647 , 0.709804 },
|
| 755 |
"MistyRose4", {0.545098 , 0.490196 , 0.482353 },
|
| 756 |
"NavajoWhite", {1.000000 , 0.870588 , 0.678431 },
|
| 757 |
"NavajoWhite1", {1.000000 , 0.870588 , 0.678431 },
|
| 758 |
"NavajoWhite2", {0.933333 , 0.811765 , 0.631373 },
|
| 759 |
"NavajoWhite3", {0.803922 , 0.701961 , 0.545098 },
|
| 760 |
"NavajoWhite4", {0.545098 , 0.474510 , 0.368627 },
|
| 761 |
"NavyBlue", {0.000000 , 0.000000 , 0.501961 },
|
| 762 |
"OldLace", {0.992157 , 0.960784 , 0.901961 },
|
| 763 |
"OliveDrab", {0.419608 , 0.556863 , 0.137255 },
|
| 764 |
"OliveDrab1", {0.752941 , 1.000000 , 0.243137 },
|
| 765 |
"OliveDrab2", {0.701961 , 0.933333 , 0.227451 },
|
| 766 |
"OliveDrab3", {0.603922 , 0.803922 , 0.196078 },
|
| 767 |
"OliveDrab4", {0.411765 , 0.545098 , 0.133333 },
|
| 768 |
"OrangeRed", {1.000000 , 0.270588 , 0.000000 },
|
| 769 |
"OrangeRed1", {1.000000 , 0.270588 , 0.000000 },
|
| 770 |
"OrangeRed2", {0.933333 , 0.250980 , 0.000000 },
|
| 771 |
"OrangeRed3", {0.803922 , 0.215686 , 0.000000 },
|
| 772 |
"OrangeRed4", {0.545098 , 0.145098 , 0.000000 },
|
| 773 |
"PaleGoldenrod", {0.933333 , 0.909804 , 0.666667 },
|
| 774 |
"PaleGreen", {0.596078 , 0.984314 , 0.596078 },
|
| 775 |
"PaleGreen1", {0.603922 , 1.000000 , 0.603922 },
|
| 776 |
"PaleGreen2", {0.564706 , 0.933333 , 0.564706 },
|
| 777 |
"PaleGreen3", {0.486275 , 0.803922 , 0.486275 },
|
| 778 |
"PaleGreen4", {0.329412 , 0.545098 , 0.329412 },
|
| 779 |
"PaleTurquoise", {0.686275 , 0.933333 , 0.933333 },
|
| 780 |
"PaleTurquoise1", {0.733333 , 1.000000 , 1.000000 },
|
| 781 |
"PaleTurquoise2", {0.682353 , 0.933333 , 0.933333 },
|
| 782 |
"PaleTurquoise3", {0.588235 , 0.803922 , 0.803922 },
|
| 783 |
"PaleTurquoise4", {0.400000 , 0.545098 , 0.545098 },
|
| 784 |
"PaleVioletRed", {0.858824 , 0.439216 , 0.576471 },
|
| 785 |
"PaleVioletRed1", {1.000000 , 0.509804 , 0.670588 },
|
| 786 |
"PaleVioletRed2", {0.933333 , 0.474510 , 0.623529 },
|
| 787 |
"PaleVioletRed3", {0.803922 , 0.407843 , 0.537255 },
|
| 788 |
"PaleVioletRed4", {0.545098 , 0.278431 , 0.364706 },
|
| 789 |
"PapayaWhip", {1.000000 , 0.937255 , 0.835294 },
|
| 790 |
"PeachPuff", {1.000000 , 0.854902 , 0.725490 },
|
| 791 |
"PeachPuff1", {1.000000 , 0.854902 , 0.725490 },
|
| 792 |
"PeachPuff2", {0.933333 , 0.796078 , 0.678431 },
|
| 793 |
"PeachPuff3", {0.803922 , 0.686275 , 0.584314 },
|
| 794 |
"PeachPuff4", {0.545098 , 0.466667 , 0.396078 },
|
| 795 |
"PowderBlue", {0.690196 , 0.878431 , 0.901961 },
|
| 796 |
"RosyBrown", {0.737255 , 0.560784 , 0.560784 },
|
| 797 |
"RosyBrown1", {1.000000 , 0.756863 , 0.756863 },
|
| 798 |
"RosyBrown2", {0.933333 , 0.705882 , 0.705882 },
|
| 799 |
"RosyBrown3", {0.803922 , 0.607843 , 0.607843 },
|
| 800 |
"RosyBrown4", {0.545098 , 0.411765 , 0.411765 },
|
| 801 |
"RoyalBlue", {0.254902 , 0.411765 , 0.882353 },
|
| 802 |
"RoyalBlue1", {0.282353 , 0.462745 , 1.000000 },
|
| 803 |
"RoyalBlue2", {0.262745 , 0.431373 , 0.933333 },
|
| 804 |
"RoyalBlue3", {0.227451 , 0.372549 , 0.803922 },
|
| 805 |
"RoyalBlue4", {0.152941 , 0.250980 , 0.545098 },
|
| 806 |
"SaddleBrown", {0.545098 , 0.270588 , 0.074510 },
|
| 807 |
"SandyBrown", {0.956863 , 0.643137 , 0.376471 },
|
| 808 |
"SeaGreen", {0.180392 , 0.545098 , 0.341176 },
|
| 809 |
"SeaGreen1", {0.329412 , 1.000000 , 0.623529 },
|
| 810 |
"SeaGreen2", {0.305882 , 0.933333 , 0.580392 },
|
| 811 |
"SeaGreen3", {0.262745 , 0.803922 , 0.501961 },
|
| 812 |
"SeaGreen4", {0.180392 , 0.545098 , 0.341176 },
|
| 813 |
"SkyBlue", {0.529412 , 0.807843 , 0.921569 },
|
| 814 |
"SkyBlue1", {0.529412 , 0.807843 , 1.000000 },
|
| 815 |
"SkyBlue2", {0.494118 , 0.752941 , 0.933333 },
|
| 816 |
"SkyBlue3", {0.423529 , 0.650980 , 0.803922 },
|
| 817 |
"SkyBlue4", {0.290196 , 0.439216 , 0.545098 },
|
| 818 |
"SlateBlue", {0.415686 , 0.352941 , 0.803922 },
|
| 819 |
"SlateBlue1", {0.513725 , 0.435294 , 1.000000 },
|
| 820 |
"SlateBlue2", {0.478431 , 0.403922 , 0.933333 },
|
| 821 |
"SlateBlue3", {0.411765 , 0.349020 , 0.803922 },
|
| 822 |
"SlateBlue4", {0.278431 , 0.235294 , 0.545098 },
|
| 823 |
"SlateGray", {0.439216 , 0.501961 , 0.564706 },
|
| 824 |
"SlateGray1", {0.776471 , 0.886275 , 1.000000 },
|
| 825 |
"SlateGray2", {0.725490 , 0.827451 , 0.933333 },
|
| 826 |
"SlateGray3", {0.623529 , 0.713725 , 0.803922 },
|
| 827 |
"SlateGray4", {0.423529 , 0.482353 , 0.545098 },
|
| 828 |
"SlateGrey", {0.439216 , 0.501961 , 0.564706 },
|
| 829 |
"SpringGreen", {0.000000 , 1.000000 , 0.498039 },
|
| 830 |
"SpringGreen1", {0.000000 , 1.000000 , 0.498039 },
|
| 831 |
"SpringGreen2", {0.000000 , 0.933333 , 0.462745 },
|
| 832 |
"SpringGreen3", {0.000000 , 0.803922 , 0.400000 },
|
| 833 |
"SpringGreen4", {0.000000 , 0.545098 , 0.270588 },
|
| 834 |
"SteelBlue", {0.274510 , 0.509804 , 0.705882 },
|
| 835 |
"SteelBlue1", {0.388235 , 0.721569 , 1.000000 },
|
| 836 |
"SteelBlue2", {0.360784 , 0.674510 , 0.933333 },
|
| 837 |
"SteelBlue3", {0.309804 , 0.580392 , 0.803922 },
|
| 838 |
"SteelBlue4", {0.211765 , 0.392157 , 0.545098 },
|
| 839 |
"VioletRed", {0.815686 , 0.125490 , 0.564706 },
|
| 840 |
"VioletRed1", {1.000000 , 0.243137 , 0.588235 },
|
| 841 |
"VioletRed2", {0.933333 , 0.227451 , 0.549020 },
|
| 842 |
"VioletRed3", {0.803922 , 0.196078 , 0.470588 },
|
| 843 |
"VioletRed4", {0.545098 , 0.133333 , 0.321569 },
|
| 844 |
"WhiteSmoke", {0.960784 , 0.960784 , 0.960784 },
|
| 845 |
"YellowGreen", {0.603922 , 0.803922 , 0.196078 },
|
| 846 |
"alice_blue", {0.941176 , 0.972549 , 1.000000 },
|
| 847 |
"antique_white", {0.980392 , 0.921569 , 0.843137 },
|
| 848 |
"aquamarine", {0.498039 , 1.000000 , 0.831373 },
|
| 849 |
"aquamarine1", {0.498039 , 1.000000 , 0.831373 },
|
| 850 |
"aquamarine2", {0.462745 , 0.933333 , 0.776471 },
|
| 851 |
"aquamarine3", {0.400000 , 0.803922 , 0.666667 },
|
| 852 |
"aquamarine4", {0.270588 , 0.545098 , 0.454902 },
|
| 853 |
"azure", {0.941176 , 1.000000 , 1.000000 },
|
| 854 |
"azure1", {0.941176 , 1.000000 , 1.000000 },
|
| 855 |
"azure2", {0.878431 , 0.933333 , 0.933333 },
|
| 856 |
"azure3", {0.756863 , 0.803922 , 0.803922 },
|
| 857 |
"azure4", {0.513725 , 0.545098 , 0.545098 },
|
| 858 |
"beige", {0.960784 , 0.960784 , 0.862745 },
|
| 859 |
"bisque", {1.000000 , 0.894118 , 0.768627 },
|
| 860 |
"bisque1", {1.000000 , 0.894118 , 0.768627 },
|
| 861 |
"bisque2", {0.933333 , 0.835294 , 0.717647 },
|
| 862 |
"bisque3", {0.803922 , 0.717647 , 0.619608 },
|
| 863 |
"bisque4", {0.545098 , 0.490196 , 0.419608 },
|
| 864 |
"black", {0.000000 , 0.000000 , 0.000000 },
|
| 865 |
"blanched_almond", {1.000000 , 0.921569 , 0.803922 },
|
| 866 |
"blue", {0.000000 , 0.000000 , 1.000000 },
|
| 867 |
"blue1", {0.000000 , 0.000000 , 1.000000 },
|
| 868 |
"blue2", {0.000000 , 0.000000 , 0.933333 },
|
| 869 |
"blue3", {0.000000 , 0.000000 , 0.803922 },
|
| 870 |
"blue4", {0.000000 , 0.000000 , 0.545098 },
|
| 871 |
"blue_violet", {0.541176 , 0.168627 , 0.886275 },
|
| 872 |
"brown", {0.647059 , 0.164706 , 0.164706 },
|
| 873 |
"brown1", {1.000000 , 0.250980 , 0.250980 },
|
| 874 |
"brown2", {0.933333 , 0.231373 , 0.231373 },
|
| 875 |
"brown3", {0.803922 , 0.200000 , 0.200000 },
|
| 876 |
"brown4", {0.545098 , 0.137255 , 0.137255 },
|
| 877 |
"burlywood", {0.870588 , 0.721569 , 0.529412 },
|
| 878 |
"burlywood1", {1.000000 , 0.827451 , 0.607843 },
|
| 879 |
"burlywood2", {0.933333 , 0.772549 , 0.568627 },
|
| 880 |
"burlywood3", {0.803922 , 0.666667 , 0.490196 },
|
| 881 |
"burlywood4", {0.545098 , 0.450980 , 0.333333 },
|
| 882 |
"cadet_blue", {0.372549 , 0.619608 , 0.627451 },
|
| 883 |
"chartreuse", {0.498039 , 1.000000 , 0.000000 },
|
| 884 |
"chartreuse1", {0.498039 , 1.000000 , 0.000000 },
|
| 885 |
"chartreuse2", {0.462745 , 0.933333 , 0.000000 },
|
| 886 |
"chartreuse3", {0.400000 , 0.803922 , 0.000000 },
|
| 887 |
"chartreuse4", {0.270588 , 0.545098 , 0.000000 },
|
| 888 |
"chocolate", {0.823529 , 0.411765 , 0.117647 },
|
| 889 |
"chocolate1", {1.000000 , 0.498039 , 0.141176 },
|
| 890 |
"chocolate2", {0.933333 , 0.462745 , 0.129412 },
|
| 891 |
"chocolate3", {0.803922 , 0.400000 , 0.113725 },
|
| 892 |
"chocolate4", {0.545098 , 0.270588 , 0.074510 },
|
| 893 |
"coral", {1.000000 , 0.498039 , 0.313725 },
|
| 894 |
"coral1", {1.000000 , 0.447059 , 0.337255 },
|
| 895 |
"coral2", {0.933333 , 0.415686 , 0.313725 },
|
| 896 |
"coral3", {0.803922 , 0.356863 , 0.270588 },
|
| 897 |
"coral4", {0.545098 , 0.243137 , 0.184314 },
|
| 898 |
"cornflower_blue", {0.392157 , 0.584314 , 0.929412 },
|
| 899 |
"cornsilk", {1.000000 , 0.972549 , 0.862745 },
|
| 900 |
"cornsilk1", {1.000000 , 0.972549 , 0.862745 },
|
| 901 |
"cornsilk2", {0.933333 , 0.909804 , 0.803922 },
|
| 902 |
"cornsilk3", {0.803922 , 0.784314 , 0.694118 },
|
| 903 |
"cornsilk4", {0.545098 , 0.533333 , 0.470588 },
|
| 904 |
"cyan", {0.000000 , 1.000000 , 1.000000 },
|
| 905 |
"cyan1", {0.000000 , 1.000000 , 1.000000 },
|
| 906 |
"cyan2", {0.000000 , 0.933333 , 0.933333 },
|
| 907 |
"cyan3", {0.000000 , 0.803922 , 0.803922 },
|
| 908 |
"cyan4", {0.000000 , 0.545098 , 0.545098 },
|
| 909 |
"dark_goldenrod", {0.721569 , 0.525490 , 0.043137 },
|
| 910 |
"dark_green", {0.000000 , 0.392157 , 0.000000 },
|
| 911 |
"dark_khaki", {0.741176 , 0.717647 , 0.419608 },
|
| 912 |
"dark_olive_green", {0.333333 , 0.419608 , 0.184314 },
|
| 913 |
"dark_orange", {1.000000 , 0.549020 , 0.000000 },
|
| 914 |
"dark_orchid", {0.600000 , 0.196078 , 0.800000 },
|
| 915 |
"dark_salmon", {0.913725 , 0.588235 , 0.478431 },
|
| 916 |
"dark_sea_green", {0.560784 , 0.737255 , 0.560784 },
|
| 917 |
"dark_slate_blue", {0.282353 , 0.239216 , 0.545098 },
|
| 918 |
"dark_slate_gray", {0.184314 , 0.309804 , 0.309804 },
|
| 919 |
"dark_slate_grey", {0.184314 , 0.309804 , 0.309804 },
|
| 920 |
"dark_turquoise", {0.000000 , 0.807843 , 0.819608 },
|
| 921 |
"dark_violet", {0.580392 , 0.000000 , 0.827451 },
|
| 922 |
"deep_pink", {1.000000 , 0.078431 , 0.576471 },
|
| 923 |
"deep_sky_blue", {0.000000 , 0.749020 , 1.000000 },
|
| 924 |
"dim_gray", {0.411765 , 0.411765 , 0.411765 },
|
| 925 |
"dim_grey", {0.411765 , 0.411765 , 0.411765 },
|
| 926 |
"dodger_blue", {0.117647 , 0.564706 , 1.000000 },
|
| 927 |
"firebrick", {0.698039 , 0.133333 , 0.133333 },
|
| 928 |
"firebrick1", {1.000000 , 0.188235 , 0.188235 },
|
| 929 |
"firebrick2", {0.933333 , 0.172549 , 0.172549 },
|
| 930 |
"firebrick3", {0.803922 , 0.149020 , 0.149020 },
|
| 931 |
"firebrick4", {0.545098 , 0.101961 , 0.101961 },
|
| 932 |
"floral_white", {1.000000 , 0.980392 , 0.941176 },
|
| 933 |
"forest_green", {0.133333 , 0.545098 , 0.133333 },
|
| 934 |
"gainsboro", {0.862745 , 0.862745 , 0.862745 },
|
| 935 |
"ghost_white", {0.972549 , 0.972549 , 1.000000 },
|
| 936 |
"gold", {1.000000 , 0.843137 , 0.000000 },
|
| 937 |
"gold1", {1.000000 , 0.843137 , 0.000000 },
|
| 938 |
"gold2", {0.933333 , 0.788235 , 0.000000 },
|
| 939 |
"gold3", {0.803922 , 0.678431 , 0.000000 },
|
| 940 |
"gold4", {0.545098 , 0.458824 , 0.000000 },
|
| 941 |
"goldenrod", {0.854902 , 0.647059 , 0.125490 },
|
| 942 |
"goldenrod1", {1.000000 , 0.756863 , 0.145098 },
|
| 943 |
"goldenrod2", {0.933333 , 0.705882 , 0.133333 },
|
| 944 |
"goldenrod3", {0.803922 , 0.607843 , 0.113725 },
|
| 945 |
"goldenrod4", {0.545098 , 0.411765 , 0.078431 },
|
| 946 |
"gray", {0.752941 , 0.752941 , 0.752941 },
|
| 947 |
"gray0", {0.000000 , 0.000000 , 0.000000 },
|
| 948 |
"gray1", {0.011765 , 0.011765 , 0.011765 },
|
| 949 |
"gray10", {0.101961 , 0.101961 , 0.101961 },
|
| 950 |
"gray100", {1.000000 , 1.000000 , 1.000000 },
|
| 951 |
"gray11", {0.109804 , 0.109804 , 0.109804 },
|
| 952 |
"gray12", {0.121569 , 0.121569 , 0.121569 },
|
| 953 |
"gray13", {0.129412 , 0.129412 , 0.129412 },
|
| 954 |
"gray14", {0.141176 , 0.141176 , 0.141176 },
|
| 955 |
"gray15", {0.149020 , 0.149020 , 0.149020 },
|
| 956 |
"gray16", {0.160784 , 0.160784 , 0.160784 },
|
| 957 |
"gray17", {0.168627 , 0.168627 , 0.168627 },
|
| 958 |
"gray18", {0.180392 , 0.180392 , 0.180392 },
|
| 959 |
"gray19", {0.188235 , 0.188235 , 0.188235 },
|
| 960 |
"gray2", {0.019608 , 0.019608 , 0.019608 },
|
| 961 |
"gray20", {0.200000 , 0.200000 , 0.200000 },
|
| 962 |
"gray21", {0.211765 , 0.211765 , 0.211765 },
|
| 963 |
"gray22", {0.219608 , 0.219608 , 0.219608 },
|
| 964 |
"gray23", {0.231373 , 0.231373 , 0.231373 },
|
| 965 |
"gray24", {0.239216 , 0.239216 , 0.239216 },
|
| 966 |
"gray25", {0.250980 , 0.250980 , 0.250980 },
|
| 967 |
"gray26", {0.258824 , 0.258824 , 0.258824 },
|
| 968 |
"gray27", {0.270588 , 0.270588 , 0.270588 },
|
| 969 |
"gray28", {0.278431 , 0.278431 , 0.278431 },
|
| 970 |
"gray29", {0.290196 , 0.290196 , 0.290196 },
|
| 971 |
"gray3", {0.031373 , 0.031373 , 0.031373 },
|
| 972 |
"gray30", {0.301961 , 0.301961 , 0.301961 },
|
| 973 |
"gray31", {0.309804 , 0.309804 , 0.309804 },
|
| 974 |
"gray32", {0.321569 , 0.321569 , 0.321569 },
|
| 975 |
"gray33", {0.329412 , 0.329412 , 0.329412 },
|
| 976 |
"gray34", {0.341176 , 0.341176 , 0.341176 },
|
| 977 |
"gray35", {0.349020 , 0.349020 , 0.349020 },
|
| 978 |
"gray36", {0.360784 , 0.360784 , 0.360784 },
|
| 979 |
"gray37", {0.368627 , 0.368627 , 0.368627 },
|
| 980 |
"gray38", {0.380392 , 0.380392 , 0.380392 },
|
| 981 |
"gray39", {0.388235 , 0.388235 , 0.388235 },
|
| 982 |
"gray4", {0.039216 , 0.039216 , 0.039216 },
|
| 983 |
"gray40", {0.400000 , 0.400000 , 0.400000 },
|
| 984 |
"gray41", {0.411765 , 0.411765 , 0.411765 },
|
| 985 |
"gray42", {0.419608 , 0.419608 , 0.419608 },
|
| 986 |
"gray43", {0.431373 , 0.431373 , 0.431373 },
|
| 987 |
"gray44", {0.439216 , 0.439216 , 0.439216 },
|
| 988 |
"gray45", {0.450980 , 0.450980 , 0.450980 },
|
| 989 |
"gray46", {0.458824 , 0.458824 , 0.458824 },
|
| 990 |
"gray47", {0.470588 , 0.470588 , 0.470588 },
|
| 991 |
"gray48", {0.478431 , 0.478431 , 0.478431 },
|
| 992 |
"gray49", {0.490196 , 0.490196 , 0.490196 },
|
| 993 |
"gray5", {0.050980 , 0.050980 , 0.050980 },
|
| 994 |
"gray50", {0.498039 , 0.498039 , 0.498039 },
|
| 995 |
"gray51", {0.509804 , 0.509804 , 0.509804 },
|
| 996 |
"gray52", {0.521569 , 0.521569 , 0.521569 },
|
| 997 |
"gray53", {0.529412 , 0.529412 , 0.529412 },
|
| 998 |
"gray54", {0.541176 , 0.541176 , 0.541176 },
|
| 999 |
"gray55", {0.549020 , 0.549020 , 0.549020 },
|
| 1000 |
"gray56", {0.560784 , 0.560784 , 0.560784 },
|
| 1001 |
"gray57", {0.568627 , 0.568627 , 0.568627 },
|
| 1002 |
"gray58", {0.580392 , 0.580392 , 0.580392 },
|
| 1003 |
"gray59", {0.588235 , 0.588235 , 0.588235 },
|
| 1004 |
"gray6", {0.058824 , 0.058824 , 0.058824 },
|
| 1005 |
"gray60", {0.600000 , 0.600000 , 0.600000 },
|
| 1006 |
"gray61", {0.611765 , 0.611765 , 0.611765 },
|
| 1007 |
"gray62", {0.619608 , 0.619608 , 0.619608 },
|
| 1008 |
"gray63", {0.631373 , 0.631373 , 0.631373 },
|
| 1009 |
"gray64", {0.639216 , 0.639216 , 0.639216 },
|
| 1010 |
"gray65", {0.650980 , 0.650980 , 0.650980 },
|
| 1011 |
"gray66", {0.658824 , 0.658824 , 0.658824 },
|
| 1012 |
"gray67", {0.670588 , 0.670588 , 0.670588 },
|
| 1013 |
"gray68", {0.678431 , 0.678431 , 0.678431 },
|
| 1014 |
"gray69", {0.690196 , 0.690196 , 0.690196 },
|
| 1015 |
"gray7", {0.070588 , 0.070588 , 0.070588 },
|
| 1016 |
"gray70", {0.701961 , 0.701961 , 0.701961 },
|
| 1017 |
"gray71", {0.709804 , 0.709804 , 0.709804 },
|
| 1018 |
"gray72", {0.721569 , 0.721569 , 0.721569 },
|
| 1019 |
"gray73", {0.729412 , 0.729412 , 0.729412 },
|
| 1020 |
"gray74", {0.741176 , 0.741176 , 0.741176 },
|
| 1021 |
"gray75", {0.749020 , 0.749020 , 0.749020 },
|
| 1022 |
"gray76", {0.760784 , 0.760784 , 0.760784 },
|
| 1023 |
"gray77", {0.768627 , 0.768627 , 0.768627 },
|
| 1024 |
"gray78", {0.780392 , 0.780392 , 0.780392 },
|
| 1025 |
"gray79", {0.788235 , 0.788235 , 0.788235 },
|
| 1026 |
"gray8", {0.078431 , 0.078431 , 0.078431 },
|
| 1027 |
"gray80", {0.800000 , 0.800000 , 0.800000 },
|
| 1028 |
"gray81", {0.811765 , 0.811765 , 0.811765 },
|
| 1029 |
"gray82", {0.819608 , 0.819608 , 0.819608 },
|
| 1030 |
"gray83", {0.831373 , 0.831373 , 0.831373 },
|
| 1031 |
"gray84", {0.839216 , 0.839216 , 0.839216 },
|
| 1032 |
"gray85", {0.850980 , 0.850980 , 0.850980 },
|
| 1033 |
"gray86", {0.858824 , 0.858824 , 0.858824 },
|
| 1034 |
"gray87", {0.870588 , 0.870588 , 0.870588 },
|
| 1035 |
"gray88", {0.878431 , 0.878431 , 0.878431 },
|
| 1036 |
"gray89", {0.890196 , 0.890196 , 0.890196 },
|
| 1037 |
"gray9", {0.090196 , 0.090196 , 0.090196 },
|
| 1038 |
"gray90", {0.898039 , 0.898039 , 0.898039 },
|
| 1039 |
"gray91", {0.909804 , 0.909804 , 0.909804 },
|
| 1040 |
"gray92", {0.921569 , 0.921569 , 0.921569 },
|
| 1041 |
"gray93", {0.929412 , 0.929412 , 0.929412 },
|
| 1042 |
"gray94", {0.941176 , 0.941176 , 0.941176 },
|
| 1043 |
"gray95", {0.949020 , 0.949020 , 0.949020 },
|
| 1044 |
"gray96", {0.960784 , 0.960784 , 0.960784 },
|
| 1045 |
"gray97", {0.968627 , 0.968627 , 0.968627 },
|
| 1046 |
"gray98", {0.980392 , 0.980392 , 0.980392 },
|
| 1047 |
"gray99", {0.988235 , 0.988235 , 0.988235 },
|
| 1048 |
"green", {0.000000 , 1.000000 , 0.000000 },
|
| 1049 |
"green1", {0.000000 , 1.000000 , 0.000000 },
|
| 1050 |
"green2", {0.000000 , 0.933333 , 0.000000 },
|
| 1051 |
"green3", {0.000000 , 0.803922 , 0.000000 },
|
| 1052 |
"green4", {0.000000 , 0.545098 , 0.000000 },
|
| 1053 |
"green_yellow", {0.678431 , 1.000000 , 0.184314 },
|
| 1054 |
"grey", {0.752941 , 0.752941 , 0.752941 },
|
| 1055 |
"grey0", {0.000000 , 0.000000 , 0.000000 },
|
| 1056 |
"grey1", {0.011765 , 0.011765 , 0.011765 },
|
| 1057 |
"grey10", {0.101961 , 0.101961 , 0.101961 },
|
| 1058 |
"grey100", {1.000000 , 1.000000 , 1.000000 },
|
| 1059 |
"grey11", {0.109804 , 0.109804 , 0.109804 },
|
| 1060 |
"grey12", {0.121569 , 0.121569 , 0.121569 },
|
| 1061 |
"grey13", {0.129412 , 0.129412 , 0.129412 },
|
| 1062 |
"grey14", {0.141176 , 0.141176 , 0.141176 },
|
| 1063 |
"grey15", {0.149020 , 0.149020 , 0.149020 },
|
| 1064 |
"grey16", {0.160784 , 0.160784 , 0.160784 },
|
| 1065 |
"grey17", {0.168627 , 0.168627 , 0.168627 },
|
| 1066 |
"grey18", {0.180392 , 0.180392 , 0.180392 },
|
| 1067 |
"grey19", {0.188235 , 0.188235 , 0.188235 },
|
| 1068 |
"grey2", {0.019608 , 0.019608 , 0.019608 },
|
| 1069 |
"grey20", {0.200000 , 0.200000 , 0.200000 },
|
| 1070 |
"grey21", {0.211765 , 0.211765 , 0.211765 },
|
| 1071 |
"grey22", {0.219608 , 0.219608 , 0.219608 },
|
| 1072 |
"grey23", {0.231373 , 0.231373 , 0.231373 },
|
| 1073 |
"grey24", {0.239216 , 0.239216 , 0.239216 },
|
| 1074 |
"grey25", {0.250980 , 0.250980 , 0.250980 },
|
| 1075 |
"grey26", {0.258824 , 0.258824 , 0.258824 },
|
| 1076 |
"grey27", {0.270588 , 0.270588 , 0.270588 },
|
| 1077 |
"grey28", {0.278431 , 0.278431 , 0.278431 },
|
| 1078 |
"grey29", {0.290196 , 0.290196 , 0.290196 },
|
| 1079 |
"grey3", {0.031373 , 0.031373 , 0.031373 },
|
| 1080 |
"grey30", {0.301961 , 0.301961 , 0.301961 },
|
| 1081 |
"grey31", {0.309804 , 0.309804 , 0.309804 },
|
| 1082 |
"grey32", {0.321569 , 0.321569 , 0.321569 },
|
| 1083 |
"grey33", {0.329412 , 0.329412 , 0.329412 },
|
| 1084 |
"grey34", {0.341176 , 0.341176 , 0.341176 },
|
| 1085 |
"grey35", {0.349020 , 0.349020 , 0.349020 },
|
| 1086 |
"grey36", {0.360784 , 0.360784 , 0.360784 },
|
| 1087 |
"grey37", {0.368627 , 0.368627 , 0.368627 },
|
| 1088 |
"grey38", {0.380392 , 0.380392 , 0.380392 },
|
| 1089 |
"grey39", {0.388235 , 0.388235 , 0.388235 },
|
| 1090 |
"grey4", {0.039216 , 0.039216 , 0.039216 },
|
| 1091 |
"grey40", {0.400000 , 0.400000 , 0.400000 },
|
| 1092 |
"grey41", {0.411765 , 0.411765 , 0.411765 },
|
| 1093 |
"grey42", {0.419608 , 0.419608 , 0.419608 },
|
| 1094 |
"grey43", {0.431373 , 0.431373 , 0.431373 },
|
| 1095 |
"grey44", {0.439216 , 0.439216 , 0.439216 },
|
| 1096 |
"grey45", {0.450980 , 0.450980 , 0.450980 },
|
| 1097 |
"grey46", {0.458824 , 0.458824 , 0.458824 },
|
| 1098 |
"grey47", {0.470588 , 0.470588 , 0.470588 },
|
| 1099 |
"grey48", {0.478431 , 0.478431 , 0.478431 },
|
| 1100 |
"grey49", {0.490196 , 0.490196 , 0.490196 },
|
| 1101 |
"grey5", {0.050980 , 0.050980 , 0.050980 },
|
| 1102 |
"grey50", {0.498039 , 0.498039 , 0.498039 },
|
| 1103 |
"grey51", {0.509804 , 0.509804 , 0.509804 },
|
| 1104 |
"grey52", {0.521569 , 0.521569 , 0.521569 },
|
| 1105 |
"grey53", {0.529412 , 0.529412 , 0.529412 },
|
| 1106 |
"grey54", {0.541176 , 0.541176 , 0.541176 },
|
| 1107 |
"grey55", {0.549020 , 0.549020 , 0.549020 },
|
| 1108 |
"grey56", {0.560784 , 0.560784 , 0.560784 },
|
| 1109 |
"grey57", {0.568627 , 0.568627 , 0.568627 },
|
| 1110 |
"grey58", {0.580392 , 0.580392 , 0.580392 },
|
| 1111 |
"grey59", {0.588235 , 0.588235 , 0.588235 },
|
| 1112 |
"grey6", {0.058824 , 0.058824 , 0.058824 },
|
| 1113 |
"grey60", {0.600000 , 0.600000 , 0.600000 },
|
| 1114 |
"grey61", {0.611765 , 0.611765 , 0.611765 },
|
| 1115 |
"grey62", {0.619608 , 0.619608 , 0.619608 },
|
| 1116 |
"grey63", {0.631373 , 0.631373 , 0.631373 },
|
| 1117 |
"grey64", {0.639216 , 0.639216 , 0.639216 },
|
| 1118 |
"grey65", {0.650980 , 0.650980 , 0.650980 },
|
| 1119 |
"grey66", {0.658824 , 0.658824 , 0.658824 },
|
| 1120 |
"grey67", {0.670588 , 0.670588 , 0.670588 },
|
| 1121 |
"grey68", {0.678431 , 0.678431 , 0.678431 },
|
| 1122 |
"grey69", {0.690196 , 0.690196 , 0.690196 },
|
| 1123 |
"grey7", {0.070588 , 0.070588 , 0.070588 },
|
| 1124 |
"grey70", {0.701961 , 0.701961 , 0.701961 },
|
| 1125 |
"grey71", {0.709804 , 0.709804 , 0.709804 },
|
| 1126 |
"grey72", {0.721569 , 0.721569 , 0.721569 },
|
| 1127 |
"grey73", {0.729412 , 0.729412 , 0.729412 },
|
| 1128 |
"grey74", {0.741176 , 0.741176 , 0.741176 },
|
| 1129 |
"grey75", {0.749020 , 0.749020 , 0.749020 },
|
| 1130 |
"grey76", {0.760784 , 0.760784 , 0.760784 },
|
| 1131 |
"grey77", {0.768627 , 0.768627 , 0.768627 },
|
| 1132 |
"grey78", {0.780392 , 0.780392 , 0.780392 },
|
| 1133 |
"grey79", {0.788235 , 0.788235 , 0.788235 },
|
| 1134 |
"grey8", {0.078431 , 0.078431 , 0.078431 },
|
| 1135 |
"grey80", {0.800000 , 0.800000 , 0.800000 },
|
| 1136 |
"grey81", {0.811765 , 0.811765 , 0.811765 },
|
| 1137 |
"grey82", {0.819608 , 0.819608 , 0.819608 },
|
| 1138 |
"grey83", {0.831373 , 0.831373 , 0.831373 },
|
| 1139 |
"grey84", {0.839216 , 0.839216 , 0.839216 },
|
| 1140 |
"grey85", {0.850980 , 0.850980 , 0.850980 },
|
| 1141 |
"grey86", {0.858824 , 0.858824 , 0.858824 },
|
| 1142 |
"grey87", {0.870588 , 0.870588 , 0.870588 },
|
| 1143 |
"grey88", {0.878431 , 0.878431 , 0.878431 },
|
| 1144 |
"grey89", {0.890196 , 0.890196 , 0.890196 },
|
| 1145 |
"grey9", {0.090196 , 0.090196 , 0.090196 },
|
| 1146 |
"grey90", {0.898039 , 0.898039 , 0.898039 },
|
| 1147 |
"grey91", {0.909804 , 0.909804 , 0.909804 },
|
| 1148 |
"grey92", {0.921569 , 0.921569 , 0.921569 },
|
| 1149 |
"grey93", {0.929412 , 0.929412 , 0.929412 },
|
| 1150 |
"grey94", {0.941176 , 0.941176 , 0.941176 },
|
| 1151 |
"grey95", {0.949020 , 0.949020 , 0.949020 },
|
| 1152 |
"grey96", {0.960784 , 0.960784 , 0.960784 },
|
| 1153 |
"grey97", {0.968627 , 0.968627 , 0.968627 },
|
| 1154 |
"grey98", {0.980392 , 0.980392 , 0.980392 },
|
| 1155 |
"grey99", {0.988235 , 0.988235 , 0.988235 },
|
| 1156 |
"honeydew", {0.941176 , 1.000000 , 0.941176 },
|
| 1157 |
"honeydew1", {0.941176 , 1.000000 , 0.941176 },
|
| 1158 |
"honeydew2", {0.878431 , 0.933333 , 0.878431 },
|
| 1159 |
"honeydew3", {0.756863 , 0.803922 , 0.756863 },
|
| 1160 |
"honeydew4", {0.513725 , 0.545098 , 0.513725 },
|
| 1161 |
"hot_pink", {1.000000 , 0.411765 , 0.705882 },
|
| 1162 |
"indian_red", {0.803922 , 0.360784 , 0.360784 },
|
| 1163 |
"ivory", {1.000000 , 1.000000 , 0.941176 },
|
| 1164 |
"ivory1", {1.000000 , 1.000000 , 0.941176 },
|
| 1165 |
"ivory2", {0.933333 , 0.933333 , 0.878431 },
|
| 1166 |
"ivory3", {0.803922 , 0.803922 , 0.756863 },
|
| 1167 |
"ivory4", {0.545098 , 0.545098 , 0.513725 },
|
| 1168 |
"khaki", {0.941176 , 0.901961 , 0.549020 },
|
| 1169 |
"khaki1", {1.000000 , 0.964706 , 0.560784 },
|
| 1170 |
"khaki2", {0.933333 , 0.901961 , 0.521569 },
|
| 1171 |
"khaki3", {0.803922 , 0.776471 , 0.450980 },
|
| 1172 |
"khaki4", {0.545098 , 0.525490 , 0.305882 },
|
| 1173 |
"lavender", {0.901961 , 0.901961 , 0.980392 },
|
| 1174 |
"lavender_blush", {1.000000 , 0.941176 , 0.960784 },
|
| 1175 |
"lawn_green", {0.486275 , 0.988235 , 0.000000 },
|
| 1176 |
"lemon_chiffon", {1.000000 , 0.980392 , 0.803922 },
|
| 1177 |
"light_blue", {0.678431 , 0.847059 , 0.901961 },
|
| 1178 |
"light_coral", {0.941176 , 0.501961 , 0.501961 },
|
| 1179 |
"light_cyan", {0.878431 , 1.000000 , 1.000000 },
|
| 1180 |
"light_goldenrod", {0.933333 , 0.866667 , 0.509804 },
|
| 1181 |
"light_goldenrod_yellow", {0.980392 , 0.980392 , 0.823529 },
|
| 1182 |
"light_gray", {0.827451 , 0.827451 , 0.827451 },
|
| 1183 |
"light_grey", {0.827451 , 0.827451 , 0.827451 },
|
| 1184 |
"light_pink", {1.000000 , 0.713725 , 0.756863 },
|
| 1185 |
"light_salmon", {1.000000 , 0.627451 , 0.478431 },
|
| 1186 |
"light_sea_green", {0.125490 , 0.698039 , 0.666667 },
|
| 1187 |
"light_sky_blue", {0.529412 , 0.807843 , 0.980392 },
|
| 1188 |
"light_slate_blue", {0.517647 , 0.439216 , 1.000000 },
|
| 1189 |
"light_slate_gray", {0.466667 , 0.533333 , 0.600000 },
|
| 1190 |
"light_slate_grey", {0.466667 , 0.533333 , 0.600000 },
|
| 1191 |
"light_steel_blue", {0.690196 , 0.768627 , 0.870588 },
|
| 1192 |
"light_yellow", {1.000000 , 1.000000 , 0.878431 },
|
| 1193 |
"lime_green", {0.196078 , 0.803922 , 0.196078 },
|
| 1194 |
"linen", {0.980392 , 0.941176 , 0.901961 },
|
| 1195 |
"magenta", {1.000000 , 0.000000 , 1.000000 },
|
| 1196 |
"magenta1", {1.000000 , 0.000000 , 1.000000 },
|
| 1197 |
"magenta2", {0.933333 , 0.000000 , 0.933333 },
|
| 1198 |
"magenta3", {0.803922 , 0.000000 , 0.803922 },
|
| 1199 |
"magenta4", {0.545098 , 0.000000 , 0.545098 },
|
| 1200 |
"maroon", {0.690196 , 0.188235 , 0.376471 },
|
| 1201 |
"maroon1", {1.000000 , 0.203922 , 0.701961 },
|
| 1202 |
"maroon2", {0.933333 , 0.188235 , 0.654902 },
|
| 1203 |
"maroon3", {0.803922 , 0.160784 , 0.564706 },
|
| 1204 |
"maroon4", {0.545098 , 0.109804 , 0.384314 },
|
| 1205 |
"medium_aquamarine", {0.400000 , 0.803922 , 0.666667 },
|
| 1206 |
"medium_blue", {0.000000 , 0.000000 , 0.803922 },
|
| 1207 |
"medium_orchid", {0.729412 , 0.333333 , 0.827451 },
|
| 1208 |
"medium_purple", {0.576471 , 0.439216 , 0.858824 },
|
| 1209 |
"medium_sea_green", {0.235294 , 0.701961 , 0.443137 },
|
| 1210 |
"medium_slate_blue", {0.482353 , 0.407843 , 0.933333 },
|
| 1211 |
"medium_spring_green", {0.000000 , 0.980392 , 0.603922 },
|
| 1212 |
"medium_turquoise", {0.282353 , 0.819608 , 0.800000 },
|
| 1213 |
"medium_violet_red", {0.780392 , 0.082353 , 0.521569 },
|
| 1214 |
"midnight_blue", {0.098039 , 0.098039 , 0.439216 },
|
| 1215 |
"mint_cream", {0.960784 , 1.000000 , 0.980392 },
|
| 1216 |
"misty_rose", {1.000000 , 0.894118 , 0.882353 },
|
| 1217 |
"moccasin", {1.000000 , 0.894118 , 0.709804 },
|
| 1218 |
"navajo_white", {1.000000 , 0.870588 , 0.678431 },
|
| 1219 |
"navy", {0.000000 , 0.000000 , 0.501961 },
|
| 1220 |
"navy_blue", {0.000000 , 0.000000 , 0.501961 },
|
| 1221 |
"old_lace", {0.992157 , 0.960784 , 0.901961 },
|
| 1222 |
"olive_drab", {0.419608 , 0.556863 , 0.137255 },
|
| 1223 |
"orange", {1.000000 , 0.647059 , 0.000000 },
|
| 1224 |
"orange1", {1.000000 , 0.647059 , 0.000000 },
|
| 1225 |
"orange2", {0.933333 , 0.603922 , 0.000000 },
|
| 1226 |
"orange3", {0.803922 , 0.521569 , 0.000000 },
|
| 1227 |
"orange4", {0.545098 , 0.352941 , 0.000000 },
|
| 1228 |
"orange_red", {1.000000 , 0.270588 , 0.000000 },
|
| 1229 |
"orchid", {0.854902 , 0.439216 , 0.839216 },
|
| 1230 |
"orchid1", {1.000000 , 0.513725 , 0.980392 },
|
| 1231 |
"orchid2", {0.933333 , 0.478431 , 0.913725 },
|
| 1232 |
"orchid3", {0.803922 , 0.411765 , 0.788235 },
|
| 1233 |
"orchid4", {0.545098 , 0.278431 , 0.537255 },
|
| 1234 |
"pale_goldenrod", {0.933333 , 0.909804 , 0.666667 },
|
| 1235 |
"pale_green", {0.596078 , 0.984314 , 0.596078 },
|
| 1236 |
"pale_turquoise", {0.686275 , 0.933333 , 0.933333 },
|
| 1237 |
"pale_violet_red", {0.858824 , 0.439216 , 0.576471 },
|
| 1238 |
"papaya_whip", {1.000000 , 0.937255 , 0.835294 },
|
| 1239 |
"peach_puff", {1.000000 , 0.854902 , 0.725490 },
|
| 1240 |
"peru", {0.803922 , 0.521569 , 0.247059 },
|
| 1241 |
"pink", {1.000000 , 0.752941 , 0.796078 },
|
| 1242 |
"pink1", {1.000000 , 0.709804 , 0.772549 },
|
| 1243 |
"pink2", {0.933333 , 0.662745 , 0.721569 },
|
| 1244 |
"pink3", {0.803922 , 0.568627 , 0.619608 },
|
| 1245 |
"pink4", {0.545098 , 0.388235 , 0.423529 },
|
| 1246 |
"plum", {0.866667 , 0.627451 , 0.866667 },
|
| 1247 |
"plum1", {1.000000 , 0.733333 , 1.000000 },
|
| 1248 |
"plum2", {0.933333 , 0.682353 , 0.933333 },
|
| 1249 |
"plum3", {0.803922 , 0.588235 , 0.803922 },
|
| 1250 |
"plum4", {0.545098 , 0.400000 , 0.545098 },
|
| 1251 |
"powder_blue", {0.690196 , 0.878431 , 0.901961 },
|
| 1252 |
"purple", {0.627451 , 0.125490 , 0.941176 },
|
| 1253 |
"purple1", {0.607843 , 0.188235 , 1.000000 },
|
| 1254 |
"purple2", {0.568627 , 0.172549 , 0.933333 },
|
| 1255 |
"purple3", {0.490196 , 0.149020 , 0.803922 },
|
| 1256 |
"purple4", {0.333333 , 0.101961 , 0.545098 },
|
| 1257 |
"red", {1.000000 , 0.000000 , 0.000000 },
|
| 1258 |
"red1", {1.000000 , 0.000000 , 0.000000 },
|
| 1259 |
"red2", {0.933333 , 0.000000 , 0.000000 },
|
| 1260 |
"red3", {0.803922 , 0.000000 , 0.000000 },
|
| 1261 |
"red4", {0.545098 , 0.000000 , 0.000000 },
|
| 1262 |
"rosy_brown", {0.737255 , 0.560784 , 0.560784 },
|
| 1263 |
"royal_blue", {0.254902 , 0.411765 , 0.882353 },
|
| 1264 |
"saddle_brown", {0.545098 , 0.270588 , 0.074510 },
|
| 1265 |
"salmon", {0.980392 , 0.501961 , 0.447059 },
|
| 1266 |
"salmon1", {1.000000 , 0.549020 , 0.411765 },
|
| 1267 |
"salmon2", {0.933333 , 0.509804 , 0.384314 },
|
| 1268 |
"salmon3", {0.803922 , 0.439216 , 0.329412 },
|
| 1269 |
"salmon4", {0.545098 , 0.298039 , 0.223529 },
|
| 1270 |
"sandy_brown", {0.956863 , 0.643137 , 0.376471 },
|
| 1271 |
"sea_green", {0.180392 , 0.545098 , 0.341176 },
|
| 1272 |
"seashell", {1.000000 , 0.960784 , 0.933333 },
|
| 1273 |
"seashell1", {1.000000 , 0.960784 , 0.933333 },
|
| 1274 |
"seashell2", {0.933333 , 0.898039 , 0.870588 },
|
| 1275 |
"seashell3", {0.803922 , 0.772549 , 0.749020 },
|
| 1276 |
"seashell4", {0.545098 , 0.525490 , 0.509804 },
|
| 1277 |
"sienna", {0.627451 , 0.321569 , 0.176471 },
|
| 1278 |
"sienna1", {1.000000 , 0.509804 , 0.278431 },
|
| 1279 |
"sienna2", {0.933333 , 0.474510 , 0.258824 },
|
| 1280 |
"sienna3", {0.803922 , 0.407843 , 0.223529 },
|
| 1281 |
"sienna4", {0.545098 , 0.278431 , 0.149020 },
|
| 1282 |
"sky_blue", {0.529412 , 0.807843 , 0.921569 },
|
| 1283 |
"slate_blue", {0.415686 , 0.352941 , 0.803922 },
|
| 1284 |
"slate_gray", {0.439216 , 0.501961 , 0.564706 },
|
| 1285 |
"slate_grey", {0.439216 , 0.501961 , 0.564706 },
|
| 1286 |
"snow", {1.000000 , 0.980392 , 0.980392 },
|
| 1287 |
"snow1", {1.000000 , 0.980392 , 0.980392 },
|
| 1288 |
"snow2", {0.933333 , 0.913725 , 0.913725 },
|
| 1289 |
"snow3", {0.803922 , 0.788235 , 0.788235 },
|
| 1290 |
"snow4", {0.545098 , 0.537255 , 0.537255 },
|
| 1291 |
"spring_green", {0.000000 , 1.000000 , 0.498039 },
|
| 1292 |
"steel_blue", {0.274510 , 0.509804 , 0.705882 },
|
| 1293 |
"tan", {0.823529 , 0.705882 , 0.549020 },
|
| 1294 |
"tan1", {1.000000 , 0.647059 , 0.309804 },
|
| 1295 |
"tan2", {0.933333 , 0.603922 , 0.286275 },
|
| 1296 |
"tan3", {0.803922 , 0.521569 , 0.247059 },
|
| 1297 |
"tan4", {0.545098 , 0.352941 , 0.168627 },
|
| 1298 |
"thistle", {0.847059 , 0.749020 , 0.847059 },
|
| 1299 |
"thistle1", {1.000000 , 0.882353 , 1.000000 },
|
| 1300 |
"thistle2", {0.933333 , 0.823529 , 0.933333 },
|
| 1301 |
"thistle3", {0.803922 , 0.709804 , 0.803922 },
|
| 1302 |
"thistle4", {0.545098 , 0.482353 , 0.545098 },
|
| 1303 |
"tomato", {1.000000 , 0.388235 , 0.278431 },
|
| 1304 |
"tomato1", {1.000000 , 0.388235 , 0.278431 },
|
| 1305 |
"tomato2", {0.933333 , 0.360784 , 0.258824 },
|
| 1306 |
"tomato3", {0.803922 , 0.309804 , 0.223529 },
|
| 1307 |
"tomato4", {0.545098 , 0.211765 , 0.149020 },
|
| 1308 |
"turquoise", {0.250980 , 0.878431 , 0.815686 },
|
| 1309 |
"turquoise1", {0.000000 , 0.960784 , 1.000000 },
|
| 1310 |
"turquoise2", {0.000000 , 0.898039 , 0.933333 },
|
| 1311 |
"turquoise3", {0.000000 , 0.772549 , 0.803922 },
|
| 1312 |
"turquoise4", {0.000000 , 0.525490 , 0.545098 },
|
| 1313 |
"violet", {0.933333 , 0.509804 , 0.933333 },
|
| 1314 |
"violet_red", {0.815686 , 0.125490 , 0.564706 },
|
| 1315 |
"wheat", {0.960784 , 0.870588 , 0.701961 },
|
| 1316 |
"wheat1", {1.000000 , 0.905882 , 0.729412 },
|
| 1317 |
"wheat2", {0.933333 , 0.847059 , 0.682353 },
|
| 1318 |
"wheat3", {0.803922 , 0.729412 , 0.588235 },
|
| 1319 |
"wheat4", {0.545098 , 0.494118 , 0.400000 },
|
| 1320 |
"white", {1.000000 , 1.000000 , 1.000000 },
|
| 1321 |
"white_smoke", {0.960784 , 0.960784 , 0.960784 },
|
| 1322 |
"yellow", {1.000000 , 1.000000 , 0.000000 },
|
| 1323 |
"yellow1", {1.000000 , 1.000000 , 0.000000 },
|
| 1324 |
"yellow2", {0.933333 , 0.933333 , 0.000000 },
|
| 1325 |
"yellow3", {0.803922 , 0.803922 , 0.000000 },
|
| 1326 |
"yellow4", {0.545098 , 0.545098 , 0.000000 },
|
| 1327 |
"yellow_green", {0.603922 , 0.803922 , 0.196078 }
|
| 1328 |
} ;
|
| 1329 |
|
| 1330 |
int
|
| 1331 |
LookupColorByName(name, color)
|
| 1332 |
char * name ;
|
| 1333 |
Vec color ;
|
| 1334 |
{
|
| 1335 |
int rc ;
|
| 1336 |
rc = BinarySearch(name, 0, NCOLORS - 1 , Colors) ;
|
| 1337 |
if (rc < 0) {
|
| 1338 |
return(0) ;
|
| 1339 |
}
|
| 1340 |
|
| 1341 |
VecCopy(Colors[rc].ce_color, color) ;
|
| 1342 |
return 1 ;
|
| 1343 |
}
|
| 1344 |
|
| 1345 |
|
| 1346 |
int
|
| 1347 |
BinarySearch(name, l, h, array)
|
| 1348 |
char * name ;
|
| 1349 |
int l, h ;
|
| 1350 |
ColorEntry array[] ;
|
| 1351 |
{
|
| 1352 |
int m, rc ;
|
| 1353 |
if (l > h)
|
| 1354 |
return(-1) ;
|
| 1355 |
|
| 1356 |
m = (l + h) / 2 ;
|
| 1357 |
|
| 1358 |
rc = strcmp(name, array[m].ce_name) ;
|
| 1359 |
if (rc == 0)
|
| 1360 |
return m ;
|
| 1361 |
else if (rc < 0)
|
| 1362 |
return BinarySearch(name, l, m-1, array) ;
|
| 1363 |
else
|
| 1364 |
return BinarySearch(name, m + 1, h, array) ;
|
| 1365 |
}
|