|
From: Patrick A. <pat...@Co...> - 2015-04-14 04:10:42
|
> > Moreland gives the generating equations for the MSH color space used > to generate the palette you started with. You could either use these to > describe a continuous palette using "set palette functions" or you could > contribute a new bit of code to select the MSH colorspace as an alternative > to RGB/CMY/HSV/YIQ/etc. Either way the "maxcolors" option would then > work to sample from a continuous palette. > > Here is a quick try at defining a similar (but not exact) continuous palette: > > R(x) = 0.2 + 0.8 * sin(x*2.2) > B(x) = 0.2 + 0.8 * sin(0.9 + x*2.2) > G(x) = 0.3 + 0.83 * sin(x * 3.) - 0.4*x > set palette functions R(gray), G(gray), B(gray) > set palette maxcolors 5 > test palette > > If those continuous functions are not close enough to the Moreland palette, > you can replace them with the equations from the paper. > > Ethan > Ok, thanks for the info. It does seem that the 'x11' terminal is doing some sort of simple interpolation on the 256 points to honor the maxcolors 5 setting. This should be trivial to implement for the other terminals, but I won't push the issue any more. |