Exercise 1: Color Conversions

Hex to RGB & RGBA

  1. #1E90FF
    • RGB: rgb(30, 144, 255)
    • RGBA: rgba(30, 144, 255, 1)
  2. #32CD32
    • RGB: rgb(50, 205, 50)
    • RGBA: rgba(50, 205, 50, 1)
  3. #FFD700
    • RGB: rgb(255, 215, 0)
    • RGBA: rgba(255, 215, 0, 1)

50%-transparent Teal

  • rgba(0, 128, 128, 0.5)

Exercise 2: Icon Design

2×2 Icon Colors

  1. Red: #FF0000
  2. Green: #00FF00
  3. Blue: #0000FF
  4. Yellow: #FFFF00

Storage Calculation

  • Bits per pixel: 24 bits
  • Number of pixels: 4 (2×2)
  • Total bits: 24 × 4 = 96 bits (or 12 bytes)

Exercise 3: Base64 Encoding

String “Cat” in Base64

Q2F0

1×1 Red PNG in Base64

```html 1x1 red pixel