A module to manipulate color information easily.
From the sources:
Download the latest grapefruit library from:
Untar the source distribution and run:
$ python setup.py build $ python setup.py install
With setuptools installed:
$ python setup.py test
Without setuptools installed:
$ python grapefruit_test.py
Getting the code
View the trunk at:
Check out the latest development version anonymously with:
$ svn checkout http://grapefruit.googlecode.com/svn/trunk/ GrapeFruit
You can download a compiled version of the documentation at:
The documentation is generated from reStructuredText sources by Sphinx. If you need to build it, go into the doc folder and run:
Or, if you’re running windows:
Copyright (c) 2008, Xavier Basty Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
- Released 0.1a3
- Added Gradient
- Fixed overflow in alpha blending.
- Added Saturate/Desaturate.
- Added MonochromeScheme
- Added the mode parameter to the generation methods to choose the color wheel use for the generation (ryb/rgb).
- Added the RGB<->RYB hue conversion.
- Added an angle parameter to the tetrad scheme to control the shape of the rectangle.
- Released 0.1a2
- Fixed the HSL->RGB conversion (the modulo in the hue conversion was 60 instead of 6.0!) Updated the unit tests (which were wrong!)
Released 0.1a1 - Convert the documentation to Sphinx - Completed the unit tests - Fixed some stupid typos
- Refactored pretty much everything to more standard “Python coding style”.
- Replaced the global variables by Color properties.
- Moved the module functions to static methods of Color.
- Completed the CIE white point dictionary to include all the standard illuminants.
- Added doctest for all the functions.
- Fixed the conversions factors to get better results (more exact and more symmetric).
- Changed the range of the L component from [0~1] to [0~100] (as it should have been).
- Added packaging data and setup.
- Changed the structure of the unit tests.
Released 0.1a0 - Initial checkin of grapefruit