You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #104746 from zaevi/fix_color_html
Fix reversed hex order in `Color::to_html`
This commit is contained in:
@@ -113,10 +113,8 @@ void _append_hex(float p_val, char32_t *string) {
|
|||||||
int v = Math::round(p_val * 255.0f);
|
int v = Math::round(p_val * 255.0f);
|
||||||
v = CLAMP(v, 0, 255);
|
v = CLAMP(v, 0, 255);
|
||||||
|
|
||||||
for (int i = 0; i < 2; i++) {
|
string[0] = hex_char_table_lower[(v >> 4) & 0xF];
|
||||||
string[i] = hex_char_table_lower[v & 0xF];
|
string[1] = hex_char_table_lower[v & 0xF];
|
||||||
v >>= 4;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String Color::to_html(bool p_alpha) const {
|
String Color::to_html(bool p_alpha) const {
|
||||||
|
|||||||
Reference in New Issue
Block a user