summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-09 08:30:10 +0200
committerGitHub <noreply@github.com>2019-07-09 08:30:10 +0200
commit2fd902a08fdce6a1dc7abd2ea2d9a0c13cb21d76 (patch)
treef9c31a9399880dee1fe43775452aea4b4a863db1 /scene/gui
parent675b9cb4c2e9b496005216c13d5f19eee892a4f5 (diff)
parent28d3a6051ce197579817fb56521f539f2951d7e1 (diff)
Merge pull request #30438 from Calinou/use-color-constructors
Use base `Color()` constructors instead of `Color::html()`
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/rich_text_label.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 5b91299de6..d6c0981ebc 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1942,37 +1942,37 @@ Error RichTextLabel::append_bbcode(const String &p_bbcode) {
if (col.begins_with("#"))
color = Color::html(col);
else if (col == "aqua")
- color = Color::html("#00FFFF");
+ color = Color(0, 1, 1);
else if (col == "black")
- color = Color::html("#000000");
+ color = Color(0, 0, 0);
else if (col == "blue")
- color = Color::html("#0000FF");
+ color = Color(0, 0, 1);
else if (col == "fuchsia")
- color = Color::html("#FF00FF");
+ color = Color(1, 0, 1);
else if (col == "gray" || col == "grey")
- color = Color::html("#808080");
+ color = Color(0.5, 0.5, 0.5);
else if (col == "green")
- color = Color::html("#008000");
+ color = Color(0, 0.5, 0);
else if (col == "lime")
- color = Color::html("#00FF00");
+ color = Color(0, 1, 0);
else if (col == "maroon")
- color = Color::html("#800000");
+ color = Color(0.5, 0, 0);
else if (col == "navy")
- color = Color::html("#000080");
+ color = Color(0, 0, 0.5);
else if (col == "olive")
- color = Color::html("#808000");
+ color = Color(0.5, 0.5, 0);
else if (col == "purple")
- color = Color::html("#800080");
+ color = Color(0.5, 0, 0.5);
else if (col == "red")
- color = Color::html("#FF0000");
+ color = Color(1, 0, 0);
else if (col == "silver")
- color = Color::html("#C0C0C0");
+ color = Color(0.75, 0.75, 0.75);
else if (col == "teal")
- color = Color::html("#008008");
+ color = Color(0, 0.5, 0.5);
else if (col == "white")
- color = Color::html("#FFFFFF");
+ color = Color(1, 1, 1);
else if (col == "yellow")
- color = Color::html("#FFFF00");
+ color = Color(1, 1, 0);
else
color = base_color;