From 0667297c6e161fd66d65e752b219ff49a989a7da Mon Sep 17 00:00:00 2001 From: Harshit Bansal Date: Tue, 16 May 2017 17:53:41 +0000 Subject: [PATCH] build_emoji: Fix the coloring of the white emojis. Fix the coloring of the white emojis to match that of the images in the iamcal's spritesheets. --- tools/setup/emoji/build_emoji | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/setup/emoji/build_emoji b/tools/setup/emoji/build_emoji index d3108b5478..3f5b1eaaa6 100755 --- a/tools/setup/emoji/build_emoji +++ b/tools/setup/emoji/build_emoji @@ -104,9 +104,15 @@ def color_font(name, code_point, code_point_to_fname_map): try: if name in white_emojis: white_emoji_image = Image.open(in_name).convert('RGBA') - # Paste blue onto the image using the number as a mask - white_emoji_image.paste('#40C0E7', white_emoji_image) - white_emoji_image.save(in_name) + # Reduced image size for having a 4-pixel dark yellow background + # on right and bottom of the image. + light_yellow_background = Image.new('RGBA', (124, 124), '#FCC21B') + dark_yellow_background = Image.new('RGBA', SIZE, '#F79329') + # Paste the image on a light yellow background and the resulting + # image on a dark yellow background. + light_yellow_background.paste(white_emoji_image, mask=white_emoji_image) + dark_yellow_background.paste(light_yellow_background, mask=light_yellow_background) + dark_yellow_background.save(in_name) shutil.copyfile(in_name, out_name) except IOError: raise MissingGlyphError('code_point: %r' % (code_point))