ManimCommunity / ManimCommunity/manim

Feature request [Color]: Support for perceptual color models (Oklab, Oklch)

Open
#4,820 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

new feature
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of proposed feature
Support for colors, gradients, and animations utilizing the Oklab and Oklch color models.
These color models account for the fact that color vision is both a physical, and a psychological phenomena.
RGB and HSL/HSV are very easy to implement into computers, but they don't account for some weird biases our vision has.

These perceptual models also represent device-independent color which is very useful for web video. Not every possible input is valid, and the range of possible inputs depends on your target color space (sRGB, P3, Adobe RGB, Rec. 2020, Rec. 2100).

In case the color falls outside the target color space, fall-back colors are easily computable.

See these example gradients. These are generated by interpolating between just two values. Notice how the non-perceptual models drift off into different colors, or show variations in brightness.

Image

Image

Image

## How can the new feature be used?
These color models are great for picking colors that actually do share common *apparent* properties (brightness, hue, etc). And in general, allow for much better design of your color palette.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by mapping how manim currently represents colors, gradients, and animations. Define the intended Oklab and Oklch inputs across the mentioned target color spaces, including out-of-gamut fallback behavior, then identify the affected tests and examples. Done means these models work consistently for colors, gradients, and animations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.