Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display a colored emoji

My code:

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

Playground result:

enter image description here

The Unicode U+2049 does not produce a red colored emoji like this ⁉️. Is there anything specific to be added for this color?

like image 928
u7568924 Avatar asked Jan 31 '18 04:01

u7568924


People also ask

How do you add color to your emojis?

Tap the smiley icon on the bottom corner. Choose an emote from the emoticon library. Long press the emoji for the emojis color options to appear. Choose from the skin colors available.

Why can't I change the skin color of my emojis?

This is by right-clicking on the emoji in the message body itself and select the skin color in the provided options.

How do I get my emojis to print in color?

(windows key + period) to bring up emoji window. Select emoji to use. Emoji is displayed in color. Print document or save to PDF.

How do I change the emoji color on my iPhone?

How to Change the Color of Emoji on an iPhone. Go to "Settings," then hit "Accessibility." Click "Display and Text Size." Go down to "Color Filters," and toggle the slider so it is on.


1 Answers

Some characters can be displayed "as text" or "as emoji", and a "Unicode VARIATION SELECTOR" can be used to control the presentation. Example:

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

Result:

enter image description here

For more information, see 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.)

or 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.

like image 124
Martin R Avatar answered Sep 22 '22 00:09

Martin R