remotion: Add modern CSS color format support to interpolateColors#6890
remotion: Add modern CSS color format support to interpolateColors#6890JonnyBurger merged 1 commit intomainfrom
remotion: Add modern CSS color format support to interpolateColors#6890Conversation
Support oklch(), oklab(), lab(), lch(), and hwb() color formats in interpolateColors() and related color utilities. Closes #6847 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Summary
Good addition of CSS Color Level 4 support. The color space conversions use standard algorithms (OKLab/Björn Ottosson, CIE Lab/D65, HWB). The implementation is consistent across both packages/core/src/interpolate-colors.ts and packages/animation-utils/src/.../utils.ts.
Two minor issues worth addressing before merge:
| expect(result).toBe('rgba(255, 0, 0, 0.502)'); | ||
| }); | ||
|
|
||
| test('hwb interpolation', () => { |
There was a problem hiding this comment.
The comment says "Red to white at midpoint" but the test interpolates from black (hwb(0 0% 0%)) to gray (hwb(0 50% 50%)). The result rgba(255, 128, 128, 1) is correct for black→gray. Either update the comment to describe the actual test case, or clarify if a separate red→white test was intended.

Summary
oklch(),oklab(),lab(),lch(), andhwb()CSS Color Level 4 formats tointerpolateColors()@remotion/animation-utilscolor matchers andisColorValue()to recognize new formatsCloses #6847
Test plan
bun run buildsucceeds (65/65 tasks)bun run stylecheckpasses (210/210 tasks)zColor()Zod schema accepts new color formats🤖 Generated with Claude Code