Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

python-lcms2

Latest version: v0.4.4

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
PyPI package Publisher: wzjoriv
0 Stars
0 Forks
9 Versions
13.4K Downloads
Python Repo language

Scan summary

python-lcms2 was last scanned on 27 Nov 2026 at version 0.4.4. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 9 versions; the latest 5 were published within 7 days (21–27 Nov 2026).
  • Findings: No rules fired in version 0.4.4.
  • Downloads: 13,365 downloads.

Versions

9 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.4.4 LATEST 27 Nov 2026 No rules fired
0.4.3 22 Nov 2026 No rules fired
0.4.2 22 Nov 2026 No rules fired
0.4.1 21 Nov 2026 Not shown
0.4.0 21 Nov 2026 Not shown

No rules fired in 0.4.4

Findings

Findings for v0.4.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.4.4; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

python-lcms2

Color management for NumPy. Convert images between ICC profiles and color spaces in one call, measure color differences, build exact ICC profiles from your own NumPy color math, and make perceptually uniform colormaps, all backed by LittleCMS 2.

Tests Docs PyPI Python LittleCMS 2.20 License: MIT Documentation Ruff

Features

Feature What you get
One-call conversion lcms2.convert(img, "sRGB", "Display P3"): pixel formats come from the array's dtype and shape.
Profiles 25 built-ins (sRGB, Display P3, Adobe RGB, ProPhoto, Rec.2020, Lab, XYZ, …), ICC files, bytes; read and edit header, text and tags.
Transforms Rendering intents, black-point compensation, soft proofing with gamut check, multi-profile chains, device links.
Fast and safe The GIL is released during transforms; any contiguity or stride; alpha channels carried through.
Color spaces OKLab, OKLCh, CIE LCh, HSV, HWB, Display P3, Rec.2100 PQ/HLG, … as NumPy functions, mixed freely with ICC profiles.
ICC authoring lcms2.Profile(my_space) traces your NumPy to_xyz/from_xyz into an exact ICC v4/v5 profile.
Colorimetry ΔE 76/94/2000/CMC/BFD, CIECAM02, white point ⇄ color temperature, chromatic adaptation.
Tone curves Gamma, parametric and tabulated curves; evaluate, invert, join, estimate gamma.
Colormaps Perceptually uniform colormaps in OKLab, gamut-mapped, color-vision-deficiency simulation, matplotlib export.
Measurement data Read and write CGATS / IT8 files.

Wheels for Windows, Linux and macOS (x86-64 and ARM64) on Python 3.10 and later, including free-threaded 3.14t and 3.15t, and PyPy 3.11; Pyodide wheels on PyPI. NumPy is the only dependency.

Install

pip install python-lcms2
pip install "python-lcms2[plot]"      # + matplotlib for colormap export

Use

import numpy as np
import lcms2

img = np.asarray(...)                                  # (H, W, 3) uint8, e.g. from Pillow or OpenCV

p3  = lcms2.convert(img, "sRGB", "Display P3")         # uint8 in, uint8 out
lab = lcms2.Profile("sRGB").transform(img, "Lab")      # float64 L*a*b*

lcms2.convert([255, 0, 0], "sRGB", "Lab", intent="relative")
# array([54.29, 80.81, 69.89])
lcms2.convert([255, 0, 0], "sRGB", "oklab")
# array([0.6279, 0.2249, 0.1258])

Reuse a Transform when converting many images; formats are resolved per input and cached:

to_cmyk = lcms2.Transform("sRGB", lcms2.Profile("press.icc"), intent="relative", bpc=True)
cmyk = to_cmyk(img)                                    # (H, W, 4) uint8
Profiles
srgb = lcms2.Profile("sRGB")                  # built-in (case-insensitive: "display p3", "adobe rgb", …)
cmyk = lcms2.Profile("press.icc")             # a file
web  = lcms2.Profile.from_bytes(icc_bytes)    # bytes, e.g. embedded in an image

cmyk                                          # <Profile 'Fogra27L CMYK Coated Press' CMYK output v2.2>
cmyk.color_space, cmyk.device_class, cmyk.tags
cmyk.description = "Press proof"
cmyk.save("press-v2.icc")
Soft proofing
proof = lcms2.Transform(srgb, srgb, proof=cmyk, gamut_check=True)
proof(img)                                    # how img prints; out-of-gamut pixels marked gray
Your own color space, as an ICC profile
from lcms2.spaces import ColorSpace

class Gamma18(ColorSpace):
    n_channels = 3
    def to_xyz(self, rgb):
        return (rgb ** 1.8) @ M.T             # M: your 3x3 RGB→XYZ (D50) matrix
    def from_xyz(self, xyz):
        return (xyz @ M_inv.T) ** (1 / 1.8)

profile = lcms2.Profile(Gamma18())            # exact matrix/TRC profile, usable in any CMS
profile.save("gamma18.icc")
lcms2.convert(img, profile, "sRGB")

Built-in analytic spaces (lcms2.spaces.oklab, oklch, hsv, display_p3, rec2100_pq, …) work the same way: lcms2.spaces.oklab.profile is an ICC profile of OKLab.

Color differences
lcms2.delta_e(lab1, lab2)                     # CIEDE2000, vectorized over (..., 3)
lcms2.delta_e(lab1, lab2, method="cmc", l=2, c=1)
Colormaps
cm = lcms2.Colormap.from_colors(["#0b1a3a", "#f08a24", "#fff6d5"])   # interpolated in OKLab
cm = lcms2.Colormap.get("glacier")            # built-ins: lcms2.colormap.list()

rgb = cm(values)                              # (..., 3) floats; bytes=True for uint8
cm.is_lightness_monotonic(), cm.uniformity()
cm.simulate("deuteranopia")                   # color-vision-deficiency preview
plt.imshow(data, cmap=cm.to_matplotlib())

Examples

A numbered learning path from first conversions to ICC authoring, each as a script and a notebook with outputs: examples/.

Documentation

Guides and the API reference: https://wzjoriv.github.io/python-lcms2.

Contributing

Building from source and the developer commands are in docs/contributing.rst.

License

MIT. LittleCMS is © Marti Maria Saguer, MIT license (vendor/Little-CMS/LICENSE).

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases python-lcms2

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229