godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.15k stars 96 forks source link

Add black and white default presets to ColorPicker #3393

Open golddotasksquestions opened 3 years ago

golddotasksquestions commented 3 years ago

Describe the project you are working on

Applies to every Godot 4 project (Tested with Pre alpha Godot v4.0.dev.20211004.official [2e8cba0bd])

Describe the problem or limitation you are having in your project

Selecting color in general, but especially either black or white color using the color picker is one of my most used actions in Godot. In Godot 3.X this is one swift motion: Click somewhere in the square color field and drag the indicator circle into either corner.

In Godot 4 this action is no longer possible, because the color selector is now a circle with white in the center. You could still get black by click-drag the vertical darkness color picker column right to the color picker circle, but getting white requires more clicking. Snapping into the center of the circle is not a good choice either as it would make it harder to select off-white values.

The simplest solution would be to just always have two default presets: black and white.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Having two default presets of black and white would mean a lot less clicking. It would also make the bottom preset area in the color picker more self explanatory and therefore more intuitive to use.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

image

If this enhancement will not be used often, can it be worked around with a few lines of script?

It's about a basic UI necessity, it should not be worked around.

Is there a reason why this should be core and not an add-on in the asset library?

It's about a basic UI necessity, it should not be downloaded.

YuriSizov commented 3 years ago

I would probably go for a dedicated b/w button somewhere in a corner, because palettes can be deleted easily. But that adds to the complexity of this monstrosity 🙁

golddotasksquestions commented 3 years ago

@pycbouh making the first two color preset black and white as well as permanent is not an option? I would also rather not make the color picker any more complex than it already is.

YuriSizov commented 3 years ago

making the first two color preset black and white as well as permanent is not an option?

Not if we want to introduce even more editor-specific logic to it (and we don't). This shouldn't be a thing in user projects.

golddotasksquestions commented 3 years ago

This shouldn't be a thing in user projects.

Why not? Where is the difference in user project? Users projects need to be able to conventiently select black and white just the same! Especially considering how more and more people use Godot to create editors of various kinds.

Honestly I'm really surprised you feel like this even needs a discussion. Even if they are not permanent, adding these presets by default I imagine is very little effort, but adds a whole lot in terms of usability to extremely common tasks.

KoBeWi commented 3 years ago

Users projects need to be able to conventiently select black and white just the same! Especially considering how more and more people use Godot to create editors of various kinds.

Black/white presets might make sense for drawing software, but not everything uses ColorPicker for drawing. I even have a project where black and white are completely irrelevant colors, so having such presets would be useless.

YuriSizov commented 3 years ago

Why not? Where is the difference in user project?

Because this control is already too rigid and specific to be useful in user projects. No game needs exactly this color picker, which is why I want to refactor it into smaller, reusable parts at some point. Pre-defining and making non-removable some palette options is going to make it even less useful for user projects.

Note: by user projects I mean games specifically. Well, even 3rd party tools made with Godot probably don't want to have exactly that. Having a consistent look for editor plugins is a good thing, but that may come in a form of EditorColorPicker of some sort.

Even if they are not permanent, adding these presets by default I imagine is very little effort, but adds a whole lot in terms of usability to extremely common tasks.

Your initial problem comes from the fact that we now use wheel instead of a rectangle. Maybe this is worth addressing instead of adding b/w buttons.

golddotasksquestions commented 3 years ago

@KoBeWi This has absolutely nothing to do with drawing software. I have no idea how you use Godot without having to set an objects modulate or Albedo to a specific color 100 times a day. A further 100 times I set it back to white or black. This is incredibly essential especially for 2D projects or 3D projets (for visual fx, fonts, particles, or just block in objects, flatshaded one ...

In Godot using use white + alpha textures and then setting the modulate/albedo is incredibly common. It's how you color a texture dynamically without shader.

@pycbouh

No game needs exactly this color picker, which is why I want to refactor it into smaller, reusable parts at some point.

Yes that's interesting and now your first response also makes more sense to me! However once you do this refractor, it would make imho also a lot of sense for a lot of games to also have the option of setting permanent default presets. For now, having these black and white presets would just be minimal effort in terms of work on the engine, but provide a massive usability improvement compared to what we have right nowi in Godot4. Godot4 color picker is currently worse than Godot3 and it seems for no reason. I use it daily a million times you can be sure I won't stop to shut up about it until they are at least at the same level of usability. :)

AaronRecord commented 3 years ago

If we added black and white it might be nice to have transparent too.

Error7Studios commented 3 years ago

Maybe shift-clicking on any of the RGB sliders could snap the other RGB values to the same value (making it grey). Then, while still holding shift, dragging all the way to the left would give you black, and dragging all the way to the right would give you white. Also would make selecting any shade of grey faster. (I don't know how the user would discover this feature, though)

golddotasksquestions commented 3 years ago

@Error7Studios Modifier keys and shortcuts are a great addition for powerusers of a feature to speed up workflow. However they are horrible UI if they are the only way to interact with a common or basic UI flow path, since discoverability is extremely low and it requires two hands at the same time.

A single mouse click to select white or black is not too much to ask. Especially if the solution is so easy to use pre-add a user preset (all functionality that already exists).

Error7Studios commented 3 years ago

@golddotasksquestions To be clear, I agree with your proposal. I gave you a 👍. Selecting black/white should be as easy as possible. I use black and white all the time in every project (and obviously for 1-bit projects as well). Also for setting objects white and just using the self-modulate property to give them a color as you mentioned.

I mentioned a greyscale option since greys are also extremely common. (e.g., to create 4-color palette using a shader) But yes, there should be a default black, white, and transparent button in the corner, or in a palette.

insomniacUNDERSCORElemon commented 2 years ago

Note that in 4.0 the color preset update is disabled (it seems like Reduz wanted to change it?) with 1 line, if you're willing to do your own build you can simply remove it to restore the functionality.

For info see https://github.com/godotengine/godot/issues/49984

KoBeWi commented 2 years ago

^ Except that issue should've been closed long ago.

fire commented 2 years ago

What is the status of this?

YuriSizov commented 2 years ago

What is the status of this?

We have a GSoC project dedicated to the color picker. I'm not sure what the extend of it is, but this proposal would have to wait for the project to be finalized first, then can be re-evaluated.