ManimCommunity / ManimCommunity/manim
Feature request [Color]: Support for perceptual color models (Oklab, Oklch)
Nobody has claimed this yet.
- 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.
## 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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