如何显示彩色表情符号

How to display a colored emoji

我的代码:

let myemoji = "\u{2049}"
let another = "\u{2757}"

游乐场成绩:

Unicode U+2049 不会生成像这样的红色表情符号⁉️。 这个颜色有什么特别要添加的吗?

一些字符可以显示为“文本”或“表情符号”,以及 “Unicode VARIATION SELECTOR”可用于控制演示。 示例:

print("text presentation:  \u{2049}  \u{25B6}")
print("emoji presentation: \u{2049}\u{FE0F} \u{25B6}\u{FE0F}")

结果:

有关详细信息,请参阅 1.4.3 Emoji and Text Presentation Sequences

ED-8. text presentation selector — The character U+FE0E VARIATION SELECTOR-15, used to request a text presentation for an emoji character. (Also known as text variation selector in prior versions of this specification.)

ED-9. emoji presentation selector — The character U+FE0F VARIATION SELECTOR-16, used to request an emoji presentation for an emoji character. (Also known as emoji variation selector in prior versions of this specification.)

Variation Selector-16:

An invisible codepoint which specifies that the preceding character should be displayed with emoji presentation. Only required if the preceding character defaults to text presentation.