Deprecate incorrect Color::gray()

This average is not a proper approximation of a grayscale value,
get_v() is better suited for that.

If we want a real to_grayscale() conversion, it's somewhat more
involved: https://en.wikipedia.org/wiki/Grayscale

Remove the deprecated Gray() from C# bindings as it conflicts
with new named color constants.
This commit is contained in:
Rémi Verschelde
2018-08-21 17:47:31 +02:00
parent 238b70e2db
commit 2969dffbe3
4 changed files with 6 additions and 8 deletions

View File

@@ -119,7 +119,7 @@ void CollisionShape2D::_notification(int p_what) {
Color draw_col = get_tree()->get_debug_collisions_color();
if (disabled) {
float g = draw_col.gray();
float g = draw_col.get_v();
draw_col.r = g;
draw_col.g = g;
draw_col.b = g;