Calculates the luminance of a hex color.
Color in hex format (e.g., '#RRGGBB').
A number between 0 and 255 representing luminance.
const luminance = getLuminance('#FFFFFF'); // Returns 255 Copy
const luminance = getLuminance('#FFFFFF'); // Returns 255
Calculates the luminance of a hex color.