kornia.color ============ .. meta:: :description: The Color module in Kornia provides a variety of functions for color space conversions, including RGB, HLS, HSV, Lab, and more. It also offers utilities for color maps and Bayer RAW processing. .. currentmodule:: kornia.color Color space conversions on tensors with channels at axis -3, plus color maps and sepia. Conventions ----------- Color tensors are channel-first, ``(*, C, H, W)``. Float RGB inputs are unit-range nonlinear sRGB, except that :func:`rgb_to_xyz` takes linear RGB and the ``*rgb255*`` helpers use :math:`[0, 255]`. :func:`rgb_to_linear_rgb` and :func:`linear_rgb_to_rgb` apply the sRGB transfer curve. HLS and HSV hue is measured in radians. The conversion pages define the remaining channel orders and ranges. .. note:: Check a tutorial for color space conversions `here `__. .. list-table:: :widths: 30 70 * - :doc:`Color conversion ` - Conversions between :doc:`grayscale `, :doc:`RGB `, :doc:`BGR `, :doc:`RGBA `, :doc:`linear RGB `, :doc:`HLS `, :doc:`HSV `, :doc:`Lab `, :doc:`Luv `, :doc:`XYZ `, :doc:`YCbCr `, :doc:`YUV ` and :doc:`Bayer RAW `. * - :doc:`Colormap ` - Render single-channel images (depth, heat, edges) with a color map. * - :doc:`Sepia ` - The sepia tone effect. .. toctree:: :hidden: color conversion colormap sepia