Description
Tested versions
- Reproducible in v4.5.beta1.mono.official [46c495c]
System information
Godot v4.5.beta1.mono - Windows 10 (build 19045) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 32.0.15.6094) - Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (4 threads) - 15.95 GiB memory
Issue description
I have constant colors c1
, c2
and a non-constant color c3
:
c2
and c3
are shown to have the same color, green. But c3
is a non-constant color, it is not green. In this exact case the c3
's color would be yellow, but for example in the following code the actual color would change in every while loop.
var red := 0.0
while red < 1.0:
var color = Color(red, 1, 0)
red += 0.1
...
If I click the c3
's color rectangle I can choose a new color. That will overwrite the variable red
and replace it with a constant number:
I would expect that non-constant colors would not display the color rectangle and they would not be editable at all with the inline color picker.
In the following case the color could be considered being quite constant, but I would still handle this as a non-constant color. Having the color picker being able to lock red component to value of RED and being able to change only green, blue and alpha components might be the "correct" way of handling this, but probably far too complicated for rare use cases.
const RED := 1
var c4 = Color(RED, 1, 0)
Steps to reproduce
var red = 1
var c1 = Color(1, 1, 0)
var c2 = Color(0, 1, 0)
var c3 = Color(red, 1, 0)
Minimal reproduction project (MRP)
N/A
Metadata
Metadata
Assignees
Type
Projects
Status