Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions doc/users/colormaps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,6 @@ extension on this idea at [mycarta-jet]_.

.. plot:: users/plotting/colormaps/lightness.py


:math:`L^*` function
====================

There are multiple approaches to finding the best function for :math:`L^*`
across a colormap. Linear gives reasonable results (*e.g.*, [mycarta-banding]_,
[mycarta-lablinear]_). However, the Weber-Fechner law, and more generally and
recently, Stevens' Law, indicates that a logarithmic or geometric relationship
might be better (see effort on this front at [mycarta-cubelaw]_).

.. plot:: users/plotting/colormaps/Lfunction.py


Grayscale conversion
====================

Expand Down
157 changes: 0 additions & 157 deletions doc/users/plotting/colormaps/Lfunction.py

This file was deleted.

7 changes: 3 additions & 4 deletions doc/users/plotting/colormaps/grayscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
Uses lightness L* as a proxy for grayscale value.
'''

import colorconv as color

from colormaps import cmaps

#from skimage import color
Expand All @@ -14,6 +12,7 @@
import matplotlib.pyplot as plt
from matplotlib import cm
import matplotlib as mpl
from colorspacious import cspace_converter

mpl.rcParams.update({'font.size': 14})

Expand All @@ -37,8 +36,8 @@ def plot_color_gradients(cmap_category, cmap_list):
# Get rgb values for colormap
rgb = cm.get_cmap(plt.get_cmap(name))(x)[np.newaxis,:,:3]

# Get colormap in CIE LAB. We want the L here.
lab = color.rgb2lab(rgb)
# Get colormap in CAM02-UCS colorspace. We want the lightness.
lab = cspace_converter("sRGB1", "CAM02-UCS")(rgb)
L = lab[0,:,0]
L = np.float32(np.vstack((L, L, L)))

Expand Down