Giter Site home page Giter Site logo

Comments (9)

jmaen avatar jmaen commented on June 14, 2024

I played around with it a little just for fun, I imagine it could look something like that (sorry for the color artifacts):

color-picker

from motion-canvas.

aarthificial avatar aarthificial commented on June 14, 2024

While it's true that we'll need a color picker sooner or later for the sake of editable signals, I am strongly against using third-party components in the editor as they destroy any sense of consistency in terms of the visuals and the feel.

It's important to keep in mind that Motion Canvas is meant to feel like a desktop application and not a website.
Here's an example of the color picker from Blender:
image
Most notably, it uses HSV sliders that both look and work the same as any other field in the application.

As such, the color picker should be implemented using our own components.
This shouldn't be too complex as it's just a few sliders and two CSS gradients on top of each other.
We also already depend on chroma-js which provides all the logic necessary for color conversion an manipulation.

from motion-canvas.

jmaen avatar jmaen commented on June 14, 2024

I'll look into that. I guess the new NumberInput will come in handy for the sliders.

from motion-canvas.

jmaen avatar jmaen commented on June 14, 2024

Does it have to be the same layout as in Blender, i.e. one (circular) map for hue and saturation and another one for brightness, or would you also be fine with one map for saturation and brightness and another linear one for hue (as in the gif I sent)? I think the latter would be easier to implement and I like the easy way of keeping the saturation and brightness while playing around with the hue, but I guess that comes down to personal preference.

from motion-canvas.

aarthificial avatar aarthificial commented on June 14, 2024

Yes, the square + hue slider from the gif is better. It's common in most drawing software so I think it would be a good default.

from motion-canvas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.