Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A powerful, accurate, and easy-to-use Python library for doing colorspace conversions

License

NotificationsYou must be signed in to change notification settings

njsmith/colorspacious

Repository files navigation

Automated test statusTest coverageDocumentation Status

Colorspacious is a powerful, accurate, and easy-to-use library forperforming colorspace conversions.

In addition to the most common standard colorspaces (sRGB, XYZ, xyY,CIELab, CIELCh), we also include: color vision deficiency ("colorblindness") simulations using the approach of Machado et al (2009); acomplete implementation ofCIECAM02; and the perceptuallyuniform CAM02-UCS / CAM02-LCD / CAM02-SCD spaces proposed by Luo et al(2006).

To get started, simply write:

from colorspacious import cspace_convertJp, ap, bp = cspace_convert([64, 128, 255], "sRGB255", "CAM02-UCS")

This converts an sRGB value (represented as integers between 0-255) toCAM02-UCS J'a'b' coordinates (assuming standard sRGB viewingconditions by default). This requires passing through 4 intermediatecolorspaces;cspace_convert automatically finds the optimal routeand applies all conversions in sequence:

This function also of course accepts arbitrary NumPy arrays, soconverting a whole image is just as easy as converting a single value.

Documentation:
http://colorspacious.readthedocs.org/
Installation:
pip install colorspacious
Downloads:
https://pypi.python.org/pypi/colorspacious/
Code and bug tracker:
https://github.com/njsmith/colorspacious
Contact:
Nathaniel J. Smith <njs@pobox.com>
Dependencies:
  • Python 2.6+, or 3.3+
  • NumPy
Developer dependencies (only needed for hacking on source):
  • nose: needed to run tests
License:
MIT, see LICENSE.txt for details.
References for algorithms we implement:
  • Luo, M. R., Cui, G., & Li, C. (2006). Uniform colour spaces based onCIECAM02 colour appearance model. Color Research & Application, 31(4),320–330. doi:10.1002/col.20227
  • Machado, G. M., Oliveira, M. M., & Fernandes, L. A. (2009). Aphysiologically-based model for simulation of color visiondeficiency. Visualization and Computer Graphics, IEEE Transactions on,15(6), 1291–1298.http://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_Simulation/CVD_Simulation.html

Other Python packages with similar functionality that you might wantto check out as well or instead:

About

A powerful, accurate, and easy-to-use Python library for doing colorspace conversions

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp