import { Column , isMapAbleColumn , IDataRow , DEFAULT_COLOR } from '../model' ; import type { IImposer } from './interfaces' ; export function colorOf ( col , row , imposer ? , valueHint ? ) { if ( imposer && imposer . color ) { return imposer . color ( row , valueHint ) ; } if ( ! row ) { if ( isMapAbleColumn ( col ) ) { return col . getColorMapping ( ) . apply ( valueHint != null ? valueHint : 0 ) ; } return DEFAULT_COLOR ; } return col . getColor ( row ) ; }