File size: 308 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

/* IMPORT */

import _ from '~/utils';
import Color from '~/color';
import type {CHANNEL, Channels} from '~/types';

/* MAIN */

const channel = ( color: string | Channels, channel: CHANNEL ): number => {

  return _.lang.round ( Color.parse ( color )[channel] );

};

/* EXPORT */

export default channel;