def test_darken():
 assert (darken('#800', 20) == '#200')
 assert (darken('#800e', 20) == '#200e')
 assert (darken('#800', 0) == '#800')
 assert (darken('#ffffff', 10) == '#e6e6e6')
 assert (darken('#000000', 10) == '#000000')
 assert (darken('#f3148a', 25) == '#810747')
 assert (darken('#f3148aab', 25) == '#810747ab')
 assert (darken('#121212', 1) == '#0f0f0f')
 assert (darken('#999999', 100) == '#000000')
 assert (darken('#99999999', 100) == '#00000099')
 assert (darken('#1479ac', 8) == '#105f87')
 assert (darken('rgb(136, 0, 0)', 20) == 'rgb(34, 0, 0)')
 assert (darken('rgba(20, 121, 172, .13)', 8) == 'rgba(16, 95, 135, 0.13)')

def test_darken ( ) : assert ( darken ( '#800' , 20 ) == '#200' ) assert ( darken ( '#800e' , 20 ) == '#200e' ) assert ( darken ( '#800' , 0 ) == '#800' ) assert ( darken ( '#ffffff' , 10 ) == '#e6e6e6' ) assert ( darken ( '#000000' , 10 ) == '#000000' ) assert ( darken ( '#f3148a' , 25 ) == '#810747' ) assert ( darken ( '#f3148aab' , 25 ) == '#810747ab' ) assert ( darken ( '#121212' , 1 ) == '#0f0f0f' ) assert ( darken ( '#999999' , 100 ) == '#000000' ) assert ( darken ( '#99999999' , 100 ) == '#00000099' ) assert ( darken ( '#1479ac' , 8 ) == '#105f87' ) assert ( darken ( 'rgb(136, 0, 0)' , 20 ) == 'rgb(34, 0, 0)' ) assert ( darken ( 'rgba(20, 121, 172, .13)' , 8 ) == 'rgba(16, 95, 135, 0.13)' )
test darken color function .