Colors/Base 64
Exercise 1: Color Conversions
Hex to RGB & RGBA
#1E90FF
- RGB:
rgb(30, 144, 255)
- RGBA:
rgba(30, 144, 255, 1)
- RGB:
#32CD32
- RGB:
rgb(50, 205, 50)
- RGBA:
rgba(50, 205, 50, 1)
- RGB:
#FFD700
- RGB:
rgb(255, 215, 0)
- RGBA:
rgba(255, 215, 0, 1)
- RGB:
50%-transparent Teal
rgba(0, 128, 128, 0.5)
Exercise 2: Icon Design
2×2 Icon Colors
- Red:
#FF0000
- Green:
#00FF00
- Blue:
#0000FF
- 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