theatre-js / theatre

Motion design editor for the web
https://www.theatrejs.com
Apache License 2.0
10.86k stars 338 forks source link

A color prop #38

Closed AriaMinaei closed 1 year ago

AriaMinaei commented 2 years ago

Because everyone is asking for it :)

cory-glooh commented 2 years ago

Did some work on this

Video

const boxObjectConfig = { x: types.number(200), y: types.number(200), background: types.color('#FF0000') }

tomByrer commented 2 years ago

Did some work on this

Awesome! But the API seems to be RGB only? There are many types of color spaces & ways to shift colors....

https://github.com/WICG/color-api

https://towardsdatascience.com/understand-and-visualize-color-spaces-to-improve-your-machine-learning-and-deep-learning-models-4ece80108526

https://www.quora.com/What-are-the-differences-between-RGB-HSV-and-CIE-Lab

http://colorizer.org/

tomByrer commented 2 years ago

I found a new color lib that is much faster & smaller than tinycolor2: https://github.com/omgovich/colord

Not sure if it should be included, or theatre have just 1 color format (hex?) then document how users can use an external library to translate color spaces or format?

vezwork commented 1 year ago

A color prop has been added in 0.5! I won't close this issue yet because people may have more to say about the color prop.

AriaMinaei commented 1 year ago

Let's close as resolved :)