Hex to RGB Converterसूत्र

## Hex to RGB Conversion

A hex color like #3B82F6 has a numeric value of 3,899,126.

### Extracting Components

- **Red** = floor(value / 65536)
- **Green** = floor((value mod 65536) / 256)
- **Blue** = value mod 256

### Example: 3899126

- R = floor(3899126 / 65536) = 59
- G = floor((3899126 - 59*65536) / 256) = 130
- B = 3899126 - floor(3899126/256)*256 = 246
- Result: rgb(59, 130, 246)

हल किया गया उदाहरण

Convert hex value 3899126 (#3B82F6) to RGB.

  1. R = floor(3899126 / 65536) = 59
  2. G = floor((3899126 mod 65536) / 256) = 130
  3. B = 3899126 mod 256 = 246
  4. Result: rgb(59, 130, 246)