Application usage

Holds function definitions useful for porting CMasher colormaps to other applications.

cmasher.app_usage.update_tableau_pref_file(dirname='.')[source]

Update an existing Tableau ‘Preferences.tps’ file to include colormaps from CMasher.

The file is created if it does not exist yet.

Other Parameters

dirname (str. Default: ‘.’) – The relative or absolute path to the directory where the Tableau preferences file should be updated. If dirname contains an existing file called ‘Preferences.tps’, it will be updated to include CMasher colormap data. Otherwise, this file will be created in dirname.

Note

In CMasher, colormaps sometimes get modified or renamed. This function takes these cases into account as well.