import { grayscale , slate } from '../../../color' ; import { Token , readToken , TokenValue , clamp , round , } from '../../util' ; export const text = ( grade ) => readToken ( token , grade ) ; const token = { default : 'light' , type : 'COLOR' , modes : { dark , light } , } ; function dark ( grade ) { return grayscale ( clamp ( grade / 2.5 ) ) ; } function light ( grade ) { return slate ( clamp ( round ( grade / - 1.667 + 900 , 0 ) ) ) ; } text . primary = text ( 0 ) ; text . secondary = text ( 600 ) ;