: Then compute the input saturation {satI}, relative to the maximum possible saturation for {p}'s hue and luminosity {lumI}: { satI = MAX{ s : lumI*frgb_White + p/s IN [0_1]^3 } } Then clip {satI} to the range {[0_1]}. Compute also the saturation {satO} of the same chrominance vector, relative to the maximum saturation for {p}'s hue and for the desired luminosity {lumO}: { satO = MAX{ s : lumO*frgb_White + p/s IN [0_1]^3 } } else if (pm_keymatch(argv[argn], "-white", 2)) { argn++; o->white = frgb_parse(&argn, argc, argv); o->whiteWaves = NULL; } else if (pm_keymatch(argv[argn], "-varfrgb_White", 5)) { argn++; cfld_parse_args ( &argn, argc, argv, FALSE, &(o->white), &(o->whiteWaves), &(o->whiteOrg) ); } else if (pm_keymatch(argv[argn], "-kappa", 2)) { argn++; o->channelKappa = frgb_parse(&argn, argc, argv, 0.01, 100.0); { frgb_t *ck = &(o->channelKappa); double avg = pow(ck->c[0]*ck->c[1]*ck->c[2], 1.0/3.0); o->globalKappa = avg; for (i = 0; i < 3; i++) { ck->c[i] = ck->c[i]/avg; } } } else if (pm_keymatch(argv[argn], "-saturation", 2)) { argn++; o->saturation = parse_double(&argn, argc, argv, 0.0, 100.0); } frgb_t *color, cfld_wave_args_list_t *waves, cfld_int_pair_t *org o->waves = NULL; else if (pm_keymatch(argv[argn], "-varfrgb_Black", 5)) { argn++; cfld_parse_args ( &argn, argc, argv, TRUE, &(o->orgColor), &(o->waves), &(o->org) ); } , frgb_t *ref, cfld_wave_params_list_t *tables