/**
 * Calculates Luminance (perceived brightness) using modern Rec.709 coefficients.
 *
 * Matches sRGB and HDTV standards.
 *
 * @param {number} r Red component (linear or gamma-corrected)
 * @param {number} g Green component (linear or gamma-corrected)
 * @param {number} b Blue component (linear or gamma-corrected)
 * @return {number} The calculated luma value
 */
export function rgb_to_luminance(r, g, b) {
    return 0.2126 * r + 0.7152 * g + 0.0722 * b;
}