Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c10ebf4

Browse filesBrowse files
tacaswellmdboom
authored andcommitted
Merge pull request #5611 from kthyng/update-colormap-user-page
Update colormap user page
1 parent a77bb83 commit c10ebf4
Copy full SHA for c10ebf4

File tree

Expand file treeCollapse file tree

3 files changed

+3
-174
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-174
lines changed

‎doc/users/colormaps.rst

Copy file name to clipboardExpand all lines: doc/users/colormaps.rst
-13Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,6 @@ extension on this idea at [mycarta-jet]_.
126126

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

129-
130-
:math:`L^*` function
131-
====================
132-
133-
There are multiple approaches to finding the best function for :math:`L^*`
134-
across a colormap. Linear gives reasonable results (*e.g.*, [mycarta-banding]_,
135-
[mycarta-lablinear]_). However, the Weber-Fechner law, and more generally and
136-
recently, Stevens' Law, indicates that a logarithmic or geometric relationship
137-
might be better (see effort on this front at [mycarta-cubelaw]_).
138-
139-
.. plot:: users/plotting/colormaps/Lfunction.py
140-
141-
142129
Grayscale conversion
143130
====================
144131

‎doc/users/plotting/colormaps/Lfunction.py

Copy file name to clipboardExpand all lines: doc/users/plotting/colormaps/Lfunction.py
-157Lines changed: 0 additions & 157 deletions
This file was deleted.

‎doc/users/plotting/colormaps/grayscale.py

Copy file name to clipboardExpand all lines: doc/users/plotting/colormaps/grayscale.py
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
Uses lightness L* as a proxy for grayscale value.
44
'''
55

6-
import colorconv as color
7-
86
from colormaps import cmaps
97

108
#from skimage import color
@@ -14,6 +12,7 @@
1412
import matplotlib.pyplot as plt
1513
from matplotlib import cm
1614
import matplotlib as mpl
15+
from colorspacious import cspace_converter
1716

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

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

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.