]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Support CSS Color Module Level 4 (#12204)
authorLars Müller <34514239+appgurueu@users.noreply.github.com>
Wed, 27 Apr 2022 21:00:02 +0000 (23:00 +0200)
committerGitHub <noreply@github.com>
Wed, 27 Apr 2022 21:00:02 +0000 (17:00 -0400)
doc/lua_api.txt
src/util/string.cpp

index f53ab0ff7f4b99335050206d6d988d430db9da92..f54672db7de5626d27f40e153d715cea613d98b5 100644 (file)
@@ -3248,7 +3248,7 @@ Colors
 `#RRGGBBAA` defines a color in hexadecimal format and alpha channel.
 
 Named colors are also supported and are equivalent to
-[CSS Color Module Level 3](https://www.w3.org/TR/css-color-3/).
+[CSS Color Module Level 4](https://www.w3.org/TR/css-color-4/#named-color).
 To specify the value of the alpha channel, append `#A` or `#AA` to the end of
 the color name (e.g. `colorname#08`).
 
index 39cd446677df4c38741c98bce2a6420a3c405a84..b805b2f78c19b28be4420b6784ea63f7d18aabdd 100644 (file)
@@ -494,6 +494,7 @@ const static std::unordered_map<std::string, u32> s_named_colors = {
        {"plum",                 0xdda0dd},
        {"powderblue",           0xb0e0e6},
        {"purple",               0x800080},
+       {"rebeccapurple",        0x663399},
        {"red",                  0xff0000},
        {"rosybrown",            0xbc8f8f},
        {"royalblue",            0x4169e1},