UNPKG

colour-tool

Version:

dev-tool that makes colours easier to deal with

12 lines (9 loc) 301 B
require('../../mathExtension')(); const getAlpha = require('./getAlpha'); const getBeta = require('./getBeta'); module.exports = (R,G,B) => { const alpha = getAlpha(R,G,B); const beta = getBeta(R,G,B); const C2 = Math.hypot(alpha,beta); return Math.decimal(C2 * 100,1); }