Skip to main content

Color spaces made reasonable

Project description

VSL Image Appearance Library

Python module for working with color spaces and stuff

Usage

Color space conversion:

  • Convert from sRGB to libRGB
from vsl_ial.cs import convert, sRGB, linRGB

convert(sRGB(), linRGB(), color=[0.12412, 0.07493, 0.3093])

Available color spaces

Function name Color space description
XYZ() CIE XYZ
CIExyY() CIE xyY
CIELUV() CIELUV
CIELAB() CIELAB
ProLab() proLab
Oklab() Oklab
ICaCb() ICaCb
ICtCp() ICtCp
JzAzBz() Jzazbz
CAM02LCD() CAM02-LCD
CAM02SCD() CAM02-SCD
CAM02UCS() CAM02-UCS
CAM16LCD() CAM16-LCD
CAM16SCD() CAM16-SCD
CAM16UCS() CAM16-UCS
sRGB() sRGB
linRGB() linear sRGB
LMS() LMS
Opponent() Opponent color space by Zhang and Wandell
PCS23-UCS() Uniform Color Space with Advanced Hue Linearity

Available measures of the consistency between perceived and computed color differences

  • CV
  • PF/3
  • STRESS
  • Mean STRESS
  • Group STRESS
  • Weighted group STRESS

Model evaluation

Run

python -m vsl_ial.eval

To get uniformity table

COMBVD BFD-P d65 BFD-P m BFD-P c RIT-DuPont Witt Leeds Munsell-3.1.0*
CAM16-SCD 0.295 0.254 0.346 0.283 0.237 0.306 0.219 0.0871
CAM16-UCS 0.305 0.271 0.35 0.297 0.206 0.31 0.245 0.0883
CAM16-LCD 0.339 0.311 0.372 0.366 0.214 0.372 0.292 0.107
CAM02-SCD 0.296 0.266 0.338 0.303 0.244 0.303 0.221 0.111
CAM02-UCS 0.306 0.28 0.343 0.321 0.213 0.305 0.246 0.116
CAM02-LCD 0.339 0.318 0.366 0.404 0.223 0.366 0.296 0.169
PCS23-UCS 0.311 0.289 0.325 0.379 0.3 0.381 0.332 0.0741
CIELAB 0.426 0.41 0.433 0.543 0.334 0.517 0.401 0.281
ProLab 0.441 0.451 0.429 0.485 0.302 0.519 0.394 0.177
Oklab 0.471 0.515 0.424 0.416 0.318 0.452 0.45 0.074
JzAzBz 0.418 0.404 0.424 0.494 0.385 0.474 0.451 0.127
ICaCb 0.391 0.396 0.38 0.424 0.248 0.474 0.373 0.14
ICtCp 0.463 0.481 0.441 0.636 0.423 0.559 0.397 0.228
* subset of Munsell dataset

For module developers

  • How to make whl file:
python -m pip install --upgrade build
python -m build
  • How to run unit tests:
python -m unittest
  • How to run coverage:
python -m coverage run -m unittest
python -m coverage html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vsl_ial-0.0.7.tar.gz (228.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vsl_ial-0.0.7-py3-none-any.whl (229.6 kB view details)

Uploaded Python 3

File details

Details for the file vsl_ial-0.0.7.tar.gz.

File metadata

  • Download URL: vsl_ial-0.0.7.tar.gz
  • Upload date:
  • Size: 228.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for vsl_ial-0.0.7.tar.gz
Algorithm Hash digest
SHA256 85e991ab31599287b32dc837a2d3e0aa866b2da5ad5c2982078e9507ba746f36
MD5 29e4c864ce5f94d5b68094335f8f0459
BLAKE2b-256 a937a18e3ac9bd3609fa40f1bace58ee6bbfd7b99db55fe0a596ad2994fb2bd7

See more details on using hashes here.

File details

Details for the file vsl_ial-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: vsl_ial-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 229.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for vsl_ial-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 537c1487a722353b92ac5eba47697f9ea1a0c80883575a2995c69199f07c068c
MD5 386d68dd0dacdaf9664a553ef166ba9f
BLAKE2b-256 1daf7e1bebdbb3b42fe8a7d6a0cc139fad17d35533e8ed47e223f55c9dc2f13f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page