#4 Color-space aware color.lineargradient

closed
nobody
None
5
2012-10-17
2008-06-26
David Munger
No

There are two points here.

  1. The user should be able to able to specify which color space the interpolation is made in, regardless of the color space of the input colors. For instance, one could specify input colors in RGB space but require the interpolation to be made in HSB space.

  2. The direction of hue interpolation should be configurable. Since it is a cyclic variable, it is possible to interpolate in two opposite directions.

Discussion

  • David Munger
    David Munger
    2008-06-26

    Logged In: YES
    user_id=588108
    Originator: YES

    I just forgot to mention: this would allow one, for instance, to create an RGB-space rainbow color gradient, analogous to the HSB one (color.lineargradient.Rainbow), but usable in surface plots. The surface style currently does not support the HSB color space because "colorspace string not available for hsb colors".

     
  • Andre Wobst
    Andre Wobst
    2012-10-17

    • status: open --> closed

    This issue has been addressed by the PyX 0.12 release. There is a rgbgradient and cmykgradient to convert a given gradient into another color space. Unfortunately such conversion is the only option available, as neither PostScript nor PDF support the HSB colorspace for bitmap and mesh output.

    Regarding the cyclic variable, there is no built-in support at the moment, but it can easily be accomplished by derivation of the style like done in www/png/example.py available in the repository.

     
    Last edit: Andre Wobst 2012-10-17