Example 1: Pick a color from the image
Input:
Sample image “Sunset” at 160 × 100 pixels, click pixel X 112, Y 56 in the middle of the sun, averaging over 1 pixel.
Output:
| HEX | #ffd166 |
|---|---|
| RGB | rgb(255, 209, 102) |
| HSL | hsl(42.0, 100.0%, 70.0%) |
| CSS variable | --color: #ffd166; |
| Closest CSS color name | khaki (#f0e68c) |
| Black text | 14.56:1, AAA, very easy to read |
| White text | 1.44:1, Not enough contrast |
Result in words: The sun's color is #ffd166, or rgb(255, 209, 102). That’s a light yellow (hue 42°, saturation 100%, lightness 70%). The closest CSS color name is khaki, but that’s only an approximation; the exact value is in the hex code. Black text is much easier to read on this color.
