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.
This commit is contained in:
parent
873d461785
commit
7adb6b91b3
10 changed files with 1 additions and 66 deletions
|
|
@ -256,20 +256,6 @@ namespace Godot
|
|||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the most contrasting color.
|
||||
/// </summary>
|
||||
/// <returns>The most contrasting color</returns>
|
||||
public Color Contrasted()
|
||||
{
|
||||
return new Color(
|
||||
(r + 0.5f) % 1.0f,
|
||||
(g + 0.5f) % 1.0f,
|
||||
(b + 0.5f) % 1.0f,
|
||||
a
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a new color resulting from making this color darker
|
||||
/// by the specified ratio (on the range of 0 to 1).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue