Convert Figma logo to code with AI

AcademySoftwareFoundation logoOpenColorIO

A color management framework for visual effects and animation.

1,762
436
1,762
155

Top Related Projects

2,077

Colour Science for Python

2,439

Pythonic bindings for FFmpeg's libraries.

5,989

Universal Scene Description

Quick Overview

OpenColorIO (OCIO) is an open-source color management framework for visual effects and animation. It provides a standardized approach to managing color throughout the production pipeline, ensuring consistency across different software applications and devices. OCIO is widely adopted in the film and visual effects industry.

Pros

  • Industry-standard color management solution
  • Cross-platform compatibility (Windows, macOS, Linux)
  • Extensive integration with popular VFX and animation software
  • Highly customizable and extensible

Cons

  • Steep learning curve for beginners
  • Limited documentation for advanced features
  • Can be complex to set up and configure for specific workflows
  • Performance overhead in some scenarios

Code Examples

  1. Loading a configuration file:
import PyOpenColorIO as OCIO

config = OCIO.Config.CreateFromFile("/path/to/config.ocio")
processor = config.getProcessor("input_colorspace", "output_colorspace")
  1. Applying a color transformation:
import PyOpenColorIO as OCIO
import numpy as np

# Create a sample image
image = np.random.rand(100, 100, 3).astype(np.float32)

# Apply color transformation
processor = config.getProcessor("input_colorspace", "output_colorspace")
cpu_processor = processor.getDefaultCPUProcessor()
transformed_image = cpu_processor.applyRGB(image)
  1. Creating a custom color space:
import PyOpenColorIO as OCIO

config = OCIO.Config()
cs = OCIO.ColorSpace(name="custom_space")
cs.setDescription("My custom color space")
cs.setAllocation(OCIO.ALLOCATION_UNIFORM)
cs.setAllocationVars([0, 1])
config.addColorSpace(cs)

Getting Started

To get started with OpenColorIO in Python:

  1. Install the library:

    pip install OpenColorIO
    
  2. Import the library and create a configuration:

    import PyOpenColorIO as OCIO
    
    # Load a configuration file
    config = OCIO.Config.CreateFromFile("/path/to/config.ocio")
    
    # Or create a new configuration
    config = OCIO.Config()
    
    # Add color spaces, looks, and other settings as needed
    # ...
    
    # Use the configuration in your color management workflow
    processor = config.getProcessor("input_colorspace", "output_colorspace")
    
  3. Apply color transformations to your images or 3D data using the created processor.

Competitor Comparisons

2,077

Colour Science for Python

Pros of colour

  • More comprehensive color science library with a broader range of color models and transformations
  • Extensive documentation and educational resources for color science concepts
  • Actively maintained with frequent updates and community contributions

Cons of colour

  • Steeper learning curve due to its extensive feature set
  • May be overkill for simpler color management tasks
  • Slower performance compared to OpenColorIO for certain operations

Code Comparison

colour:

import colour
RGB = [0.18, 0.18, 0.18]
XYZ = colour.sRGB_to_XYZ(RGB)
Lab = colour.XYZ_to_Lab(XYZ)

OpenColorIO:

import PyOpenColorIO as ocio
config = ocio.Config.CreateFromEnv()
processor = config.getProcessor("sRGB", "Lab")
Lab = processor.applyRGB([0.18, 0.18, 0.18])

Both libraries offer color space conversions, but colour provides a more direct approach for specific transformations, while OpenColorIO uses a configuration-based system for flexible color management pipelines.

2,439

Pythonic bindings for FFmpeg's libraries.

Pros of PyAV

  • Focuses on audio/video processing and manipulation
  • Provides Python bindings for FFmpeg libraries
  • Simpler API for common audio/video tasks

Cons of PyAV

  • Limited to audio/video processing
  • Smaller community and fewer contributors
  • Less extensive documentation compared to OpenColorIO

Code Comparison

PyAV example:

import av

container = av.open('input.mp4')
for frame in container.decode(video=0):
    frame.to_image().save(f'frame-{frame.index}.jpg')

OpenColorIO example:

import PyOpenColorIO as ocio

config = ocio.Config.CreateFromEnv()
processor = config.getProcessor("input", "output")
cpu = processor.getDefaultCPUProcessor()
transformed_pixel = cpu.applyRGB([0.5, 0.5, 0.5])

PyAV is designed for audio/video processing tasks, offering a straightforward API for working with multimedia files. OpenColorIO, on the other hand, specializes in color management and transformation, providing tools for consistent color across various applications and workflows.

While PyAV excels in handling audio and video data, it lacks the advanced color management capabilities of OpenColorIO. Conversely, OpenColorIO offers robust color transformation features but doesn't provide direct audio/video manipulation functionality.

The choice between these libraries depends on the specific requirements of your project, whether it's focused on multimedia processing or color management in visual effects and animation pipelines.

5,989

Universal Scene Description

Pros of OpenUSD

  • Comprehensive 3D scene description and interchange format
  • Strong industry adoption and support from major studios
  • Extensive documentation and examples for various use cases

Cons of OpenUSD

  • Steeper learning curve due to complex architecture
  • Larger codebase and potentially higher resource requirements
  • More focused on 3D scene representation than color management

Code Comparison

OpenUSD example:

#include "pxr/usd/usd/stage.h"
#include "pxr/usd/usdGeom/sphere.h"

auto stage = pxr::UsdStage::CreateInMemory();
auto spherePrim = pxr::UsdGeomSphere::Define(stage, pxr::SdfPath("/mySphere"));
spherePrim.CreateRadiusAttr().Set(2.0);

OpenColorIO example:

#include <OpenColorIO/OpenColorIO.h>
namespace OCIO = OCIO_NAMESPACE;

OCIO::ConstConfigRcPtr config = OCIO::Config::CreateFromEnv();
OCIO::ConstProcessorRcPtr processor = config->getProcessor("input", "output");
processor->apply(pixelData, numPixels);

OpenUSD focuses on scene description and composition, while OpenColorIO specializes in color management and transformation. OpenUSD's code deals with creating and manipulating 3D objects, whereas OpenColorIO's code handles color space conversions and processing.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

OpenColorIO

License CI Status GPU CI Status Analysis Status Quality Gate Status CII Best Practices Wheels

Introduction

lnh lm10 vd8

OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation. OCIO provides a straightforward and consistent user experience across all supporting applications while allowing for sophisticated back-end configuration options suitable for high-end production usage. OCIO is compatible with the Academy Color Encoding Specification (ACES) and is LUT-format agnostic, supporting many popular formats.

OpenColorIO is released as version 2.0 and has been in development since 2003. OCIO represents the culmination of years of production experience earned on such films as SpiderMan 2 (2004), Surf's Up (2007), Cloudy with a Chance of Meatballs (2009), Alice in Wonderland (2010), and many more. OpenColorIO is natively supported in commercial applications like Katana, Mari, Nuke, Maya, Houdini, Silhouette FX, and others.

OpenColorIO is free and open source software (LICENSE), and one of several projects actively sponsored by the ASWF (Academy Software Foundation).

OpenColorIO Project Mission

The OpenColorIO project is committed to providing an industry standard solution for highly precise, performant, and consistent color management across digital content creation applications and pipelines.

OpenColorIO aims to:

  • be stable, secure, and thoroughly tested on Linux, macOS, and Windows
  • be performant on modern CPUs and GPUs
  • be simple, scalable, and well documented
  • be compatible with critical color and imaging standards
  • provide lossless color processing wherever possible
  • maintain config backwards compatibility across major versions
  • have every new feature carefully reviewed by leaders from the motion picture, VFX, animation, and video game industries
  • have a healthy and active community
  • receive wide industry adoption

OpenColorIO Project Governance

OpenColorIO is governed by the Academy Software Foundation (ASWF). See GOVERNANCE.md for detailed information about how the project operates.

Web Resources

Reference Configs

Reference OCIO configuration files and associated LUTs can be found at the Imageworks OpenColorIO-Configs repository.

The following reference implementations are provided:

  • SPI: Sony Pictures Imageworks
    • spi-anim
    • spi-vfx
  • ACES: Academy Color Encoding System
    • aces_1.0.3
    • aces_1.0.2
    • aces_1.0.1
    • aces_0.7.1
    • aces_0.1.1
  • Other
    • nuke-default

Sources for the newer builtin ACES configuration files can be found in the releases section of the OpenColorIO-Config-ACES repository.

Acknowledgements

OpenColorIO represents the generous contributions of many organizations and individuals. The "Contributors to the OpenColorIO Project" copyright statement used throughout the project reflects that the OCIO source is a collaborative effort, often with multiple copyright holders within a single file. Copyright for specific portions of code can be traced to an originating contributor using git commit history.

OpenColorIO was originally developed and made open source by Sony Pictures Imageworks. The core design, and the majority of OCIO 1.0 code was authored by Imageworks, who continue to support and contribute to OCIO 2.0 development.

The design and development of OpenColorIO 2.0 is being led by Autodesk. Autodesk submitted a proposal to revitalize the project in 2017, and have authored the majority of OCIO 2.0 code in the years since.

Significant contributions have also been made by Industrial Light & Magic, DNEG, and many individuals. See Contributors for a complete list.

See THIRD-PARTY.md for license information about portions of OpenColorIO that have been imported from other projects.


Images from "Cloudy With A Chance of Meatballs" Copyright 2011 Sony Pictures Inc. All Rights Reserved.