From 7adb6b91b33e297b4833ef5f82adcf64a15777f4 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 3 Nov 2020 00:21:06 +0100 Subject: Remove `Color.contrasted()` as its behavior is barely useful Returning the most contrasting color isn't a trivial task, as there are often many possible choices. It's usually best left for the user to implement using a script. --- modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'modules/mono/glue/GodotSharp') diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs index 3700a6194f..d0add835c0 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs @@ -256,20 +256,6 @@ namespace Godot return res; } - /// - /// Returns the most contrasting color. - /// - /// The most contrasting color - public Color Contrasted() - { - return new Color( - (r + 0.5f) % 1.0f, - (g + 0.5f) % 1.0f, - (b + 0.5f) % 1.0f, - a - ); - } - /// /// Returns a new color resulting from making this color darker /// by the specified ratio (on the range of 0 to 1). -- cgit v1.2.3