summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-02 18:51:27 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-02 18:51:27 +0100
commit62ed75df9cbac7dd1d73631b5d542000a26325b5 (patch)
treeafb03b8e5b4205282fb7492190119893e84c25a7
parentd3a6855dfced9c55043b3a8d4ae25f1390b3e86d (diff)
parent653e8f5c86a21652f3706f9e5835d477ad904dc9 (diff)
Merge pull request #64830 from dalexeev/color-hide-internals
Remove internal functions of named colors from the public API
-rw-r--r--core/variant/variant_call.cpp4
-rw-r--r--doc/classes/Color.xml31
2 files changed, 0 insertions, 35 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index 688650f532..effe7ddc62 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -1835,10 +1835,6 @@ static void _register_variant_builtin_methods() {
bind_static_method(Color, hex64, sarray("hex"), varray());
bind_static_method(Color, html, sarray("rgba"), varray());
bind_static_method(Color, html_is_valid, sarray("color"), varray());
- bind_static_method(Color, find_named_color, sarray("name"), varray());
- bind_static_method(Color, get_named_color_count, sarray(), varray());
- bind_static_method(Color, get_named_color_name, sarray("idx"), varray());
- bind_static_method(Color, get_named_color, sarray("idx"), varray());
bind_static_method(Color, from_string, sarray("str", "default"), varray());
bind_static_method(Color, from_hsv, sarray("h", "s", "v", "alpha"), varray(1.0));
bind_static_method(Color, from_ok_hsl, sarray("h", "s", "l", "alpha"), varray(1.0));
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index a11d7157f1..a14ca15ef1 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -141,17 +141,6 @@
[/codeblocks]
</description>
</method>
- <method name="find_named_color" qualifiers="static">
- <return type="int" />
- <param index="0" name="name" type="String" />
- <description>
- Returns the index of a named color. Use [method get_named_color] to get the actual color.
- [codeblock]
- var idx = Color.find_named_color("khaki")
- modulate = Color.get_named_color(idx)
- [/codeblock]
- </description>
- </method>
<method name="from_hsv" qualifiers="static">
<return type="Color" />
<param index="0" name="h" type="float" />
@@ -211,26 +200,6 @@
[b]Note:[/b] [method get_luminance] relies on the colour being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first.
</description>
</method>
- <method name="get_named_color" qualifiers="static">
- <return type="Color" />
- <param index="0" name="idx" type="int" />
- <description>
- Returns a named color with the given index. You can get the index from [method find_named_color] or iteratively from [method get_named_color_count].
- </description>
- </method>
- <method name="get_named_color_count" qualifiers="static">
- <return type="int" />
- <description>
- Returns the number of available named colors.
- </description>
- </method>
- <method name="get_named_color_name" qualifiers="static">
- <return type="String" />
- <param index="0" name="idx" type="int" />
- <description>
- Returns the name of a color with the given index. You can get the index from [method find_named_color] or iteratively from [method get_named_color_count].
- </description>
- </method>
<method name="hex" qualifiers="static">
<return type="Color" />
<param index="0" name="hex" type="int" />