Changeset 2640 in lmdz_wrf
- Timestamp:
- Jun 25, 2019, 7:43:25 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2639 r2640 16859 16859 'darken': decrease (above zero) all values by modval 16860 16860 >>> modify_color('#AA0000', 'hex', 32, 'light') 16861 CA202016861 #CA2020 16862 16862 >>> modify_color([0.2,0.8,0.6], 'dec', 32, 'darken') 16863 16863 [ 0.0745098 0.6745098 0.4745098] … … 16893 16893 16894 16894 if coltype == 'hex': 16895 finalcol = np.array(coldec_hex(newcol))16895 finalcol = coldec_hex(newcol) 16896 16896 elif coltype == 'dec': 16897 16897 finalcol = newcol … … 16901 16901 return finalcol 16902 16902 16903 print modify_color('#AA0000', 'hex', 32, 'light')16904 16905 print modify_color([0.2,0.8,0.6], 'dec', 32, 'darken')16906 16907 print modify_color([255, 255, 0], '256', 32, 'light')16908 16909 16903 #quit() 16910 16904
Note: See TracChangeset
for help on using the changeset viewer.