Skip to content

Commit

Permalink
Support CSS Color Module Level 4 (minetest#12204)
Browse files Browse the repository at this point in the history
  • Loading branch information
appgurueu committed Apr 27, 2022
1 parent 480d5f2 commit fccf1e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/lua_api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

Expand Down
1 change: 1 addition & 0 deletions src/util/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit fccf1e2

Please sign in to comment.