Convert these hex codes to RGB & RGBA (A = 1)

  • 1E90FF rgb(30, 144, 255) rgba(30, 144, 255, 1)
  • 32CD32 rgb(50, 205, 50) rgba(50, 205, 50, 1)
  • FFD700 rgb(255, 215, 0) rgba(255, 215, 0, 1)

Design a 2×2 icon

  • Top Left Red #FF0000
  • Top Right Green #00FF00
  • Bottom Left Blue #0000FF
  • Bottom Right Yellow #FFFF00

Calculate storage for that 2×2 image at 24-bit color depth:

  • Storage = 24 bits × 4 pixels = 96 bits

Base64-encode the string “Cat”

btoa("Cat") //  "Q2F0"

Create a 1×1 Red PNG, Convert to Base64, and Embed in HTML

<img src="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8z8AAAgMBAQEAAP9aNlcAAAAASUVORK5CYII=" 
alt="1x1 red pixel">