'use strict';

var index$1 = require('../utils/index.js');
var index = require('../color/index.js');

/* IMPORT */
/* MAIN */
//SOURCE: https://planetcalc.com/7779
const luminance = (color) => {
    const { r, g, b } = index.parse(color);
    const luminance = .2126 * index$1.channel.toLinear(r) + .7152 * index$1.channel.toLinear(g) + .0722 * index$1.channel.toLinear(b);
    return index$1.lang.round(luminance);
};

module.exports = luminance;
