Changeset 2640 in lmdz_wrf for trunk


Ignore:
Timestamp:
Jun 25, 2019, 7:43:25 PM (5 years ago)
Author:
lfita
Message:

Finx outcome on type `hex' from 'modify_color'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r2639 r2640  
    1685916859        'darken': decrease (above zero) all values by modval
    1686016860    >>> modify_color('#AA0000', 'hex', 32, 'light')
    16861     CA2020
     16861    #CA2020
    1686216862    >>> modify_color([0.2,0.8,0.6], 'dec', 32, 'darken')
    1686316863    [ 0.0745098  0.6745098  0.4745098]
     
    1689316893
    1689416894    if coltype == 'hex':
    16895         finalcol = np.array(coldec_hex(newcol))
     16895        finalcol = coldec_hex(newcol)
    1689616896    elif coltype == 'dec':
    1689716897        finalcol = newcol
     
    1690116901    return finalcol
    1690216902
    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 
    1690916903#quit()
    1691016904
Note: See TracChangeset for help on using the changeset viewer.