Skip to content

Commit

Permalink
doc updates for v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cormullion committed Aug 29, 2018
1 parent c8ea495 commit 63198c0
Show file tree
Hide file tree
Showing 23 changed files with 217 additions and 116 deletions.
61 changes: 61 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,64 @@ The ColorSchemes.jl package is licensed under the MIT "Expat" License:
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
### Matplotlib license

New matplotlib colormaps by Nathaniel J. Smith, Stefan van der Walt,
and (in the case of viridis) Eric Firing.

This file and the colormaps in it are released under the CC0 license /
public domain dedication. We would appreciate credit if you use or
redistribute these colormaps, but do not impose any legal restrictions.

To the extent possible under law, the persons who associated CC0 with
mpl-colormaps have waived all copyright and related or neighboring rights
to mpl-colormaps.

You should have received a copy of the CC0 legalcode along with this
work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

### ColorBrewer license

Apache-Style Software License for ColorBrewer software and ColorBrewer Color
Schemes

Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State
University.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

### CMOCEAN license

The MIT License (MIT)

Copyright (c) 2015 Kristen M. Thyng

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

see https://github.com/matplotlib/cmocean
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
[![ColorSchemes](http://pkg.julialang.org/badges/ColorSchemes_0.7.svg)](http://pkg.julialang.org/?pkg=ColorSchemes&ver=0.7)
[![ColorSchemes](http://pkg.julialang.org/badges/ColorSchemes_1.0.svg)](http://pkg.julialang.org/?pkg=ColorSchemes&ver=1.0)
<!-- [![ColorSchemes](http://pkg.julialang.org/badges/ColorSchemes_1.0.svg)](http://pkg.julialang.org/?pkg=ColorSchemes&ver=1.0) -->

[![Build Status](https://travis-ci.org/JuliaGraphics/ColorSchemes.jl.svg?branch=master)](https://travis-ci.org/JuliaGraphics/ColorSchemes.jl)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/cormullion/ColorSchemes.jl?branch=master&svg=true)](https://ci.appveyor.com/project/cormullion/ColorSchemes-jl)

Documentation:

[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaGraphics.github.io/ColorSchemes.jl/stable) This describes the most recent released version of the package.

[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://JuliaGraphics.github.io/ColorSchemes.jl/latest) This refers to the current in-development version of the package.
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaGraphics.github.io/ColorSchemes.jl/stable) [![](https://img.shields.io/badge/docs-latest-blue.svg)](https://JuliaGraphics.github.io/ColorSchemes.jl/latest)

## ColorSchemes

![big picture](docs/src/assets/figures/snapshot.png)

This package provides tools for working with colorschemes and colormaps. As well as providing many pre-made colormaps and schemes, this package allows you to extract colorschemes from images and use them in plots or other graphics programs.
This package provides tools for working with colorschemes and colormaps. It provides many pre-made colormaps and schemes:

- scientifically devised colorschemes from ColorBrewer and CMOcean
- popular old favourites such as _viridis_, _inferno_, and _magma_ from MATPlotLib
- old masters' colorschemes, such as _leonardo_, _vermeer_, and _picasso_
- variously themed colorschemes such as _sunset_, _coffee_, _neon_, and _pearl_

In addition, you can extract colorschemes from images, and replace an image colorscheme with another.

!!! Note

The package is designed for general purpose and informal graphics work. For high quality color maps that have consistent perceptual contrast over their full range, refer to Peter Kovesi's [PerceptualColourMaps](https://github.com/peterkovesi/PerceptualColourMaps.jl) package.
The package is designed for general purpose and informal graphics work. For high quality color maps that have consistent perceptual contrast over their full range, refer to Peter Kovesi's [PerceptualColourMaps](https://github.com/peterkovesi/PerceptualColourMaps.jl) package.

This package relies on [Colors.jl](https://github.com/JuliaGraphics/Colors.jl) package and [Images.jl](https://github.com/JuliaImages/Images.jl).
This package relies on the [Colors.jl](https://github.com/JuliaGraphics/Colors.jl), [Images.jl](https://github.com/JuliaImages/Images.jl), and [Clustering.jl](https://github.com/JuliaStats/Clustering.jl) packages.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia v0.7
julia 0.7
Images
Colors
Clustering
Expand Down
4 changes: 1 addition & 3 deletions data/allcolorschemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,7 @@ RGB(0.0905657,0.0995937,0.164406),
RGB(0.813935, 0.656425, 0.370324),
RGB(0.91191, 0.830616, 0.618036),
RGB(0.976303, 0.999222, 0.999207)]


@reg cubehelix [
@reg cubehelix [
# Dave Green's cubehelix https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/
RGB(0.0,0.0,0.0),
RGB(0.00802,0.00136,0.00662),
Expand Down
6 changes: 1 addition & 5 deletions docs/build/assets/documenter.css
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ nav.toc ul.internal {
}

nav.toc ul.internal li.toplevel {
border-top: 1px solid #c9c9c9;
border-top: 1px solid #909090;
font-weight: bold;
}

Expand Down Expand Up @@ -460,10 +460,6 @@ article section.docstring a.source-link {
font-size: smaller;
}

#search-results .category:before {
content: " ";
}

/* Overriding the <code> block style of highligh.js.
* We have to override the padding and the background-color, since we style this
* part ourselves. Specifically, we style the <pre> surrounding the <code>, while
Expand Down
Binary file modified docs/build/assets/figures/colorschemes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions docs/build/assets/figures/draw-swatches.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env julia

# generate pictures of builtin data
# usage: julia draw-swatches.jl > somewhere/colorschemes.svg
# usage: drawallswatches("/tmp/colorschemes.png", 1000, 3500, ncols=5)

using Colors, ColorSchemes, Luxor

Expand All @@ -14,9 +12,9 @@ end

function draw_swatch(cschemename, pos, tilewidth, tileheight)
if isdefined(ColorSchemes, cschemename)
cscheme = eval(ColorSchemes, cschemename)
cscheme = Base.eval(ColorSchemes, cschemename)
else
cscheme = eval(cschemename)
cscheme = Base.eval(cschemename)
end
schemelength = length(cscheme)

Expand Down
Binary file modified docs/build/assets/figures/julia-set-with-girl-pearl-vermeer.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/build/assets/figures/pyplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions docs/build/assets/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ parseUri.options = {
requirejs.config({
paths: {
'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min',
'lunr': 'https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.1.3/lunr.min',
'lunr': 'https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.1/lunr.min',
'lodash': 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min',
}
});
Expand Down Expand Up @@ -196,6 +196,13 @@ require(["jquery", "lunr", "lodash"], function($, lunr, _) {
tokens = lunr.tokenizer(querystring)
results = index.query(function (q) {
tokens.forEach(function (t) {
q.term(t.toString(), {
fields: ["title"],
boost: 100,
usePipeline: false,
editDistance: 0,
wildcard: lunr.Query.wildcard.NONE
})
q.term(t.toString(), {
fields: ["title"],
boost: 10,
Expand All @@ -207,7 +214,7 @@ require(["jquery", "lunr", "lodash"], function($, lunr, _) {
fields: ["text"],
boost: 1,
usePipeline: true,
editDistance: 2,
editDistance: 0,
wildcard: lunr.Query.wildcard.NONE
})
})
Expand All @@ -220,7 +227,7 @@ require(["jquery", "lunr", "lodash"], function($, lunr, _) {
link.text(data.title)
link.attr('href', documenterBaseURL+'/'+result.ref)
cat = $('<span class="category">('+data.category+')</span>')
li = $('<li>').append(link).append(cat)
li = $('<li>').append(link).append(" ").append(cat)
$('#search-results').append(li)
})
}
Expand Down
2 changes: 1 addition & 1 deletion docs/build/functionindex.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Index · ColorSchemes</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link href="assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><a href="index.html"><img class="logo" src="assets/logo.png" alt="ColorSchemes logo"/></a><h1>ColorSchemes</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="search.html"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="index.html">Introduction</a></li><li><a class="toctext" href="basics.html">Basic usage</a></li><li><a class="toctext" href="inverse.html">Finding colors</a></li><li><a class="toctext" href="plotting.html">Plotting</a></li><li><a class="toctext" href="images.html">Images</a></li><li class="current"><a class="toctext" href="functionindex.html">Index</a><ul class="internal"></ul></li></ul></nav><article id="docs"><header><nav><ul><li><a href="functionindex.html">Index</a></li></ul><a class="edit-page" href="https://github.com/JuliaGraphics/ColorSchemes.jl/blob/master/docs/src/functionindex.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Index</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Index-1" href="#Index-1">Index</a></h1><ul><li><a href="basics.html#Base.get"><code>Base.get</code></a></li><li><a href="images.html#ColorSchemes.colorscheme_to_image"><code>ColorSchemes.colorscheme_to_image</code></a></li><li><a href="images.html#ColorSchemes.colorscheme_to_text"><code>ColorSchemes.colorscheme_to_text</code></a></li><li><a href="basics.html#ColorSchemes.colorscheme_weighted"><code>ColorSchemes.colorscheme_weighted</code></a></li><li><a href="inverse.html#ColorSchemes.convert_to_scheme"><code>ColorSchemes.convert_to_scheme</code></a></li><li><a href="basics.html#ColorSchemes.extract"><code>ColorSchemes.extract</code></a></li><li><a href="basics.html#ColorSchemes.extract_weighted_colors"><code>ColorSchemes.extract_weighted_colors</code></a></li><li><a href="inverse.html#ColorSchemes.getinverse"><code>ColorSchemes.getinverse</code></a></li><li><a href="images.html#ColorSchemes.image_to_swatch"><code>ColorSchemes.image_to_swatch</code></a></li><li><a href="basics.html#ColorSchemes.sortcolorscheme"><code>ColorSchemes.sortcolorscheme</code></a></li><li><a href="images.html#ColorSchemes.@reg"><code>ColorSchemes.@reg</code></a></li></ul><footer><hr/><a class="previous" href="images.html"><span class="direction">Previous</span><span class="title">Images</span></a></footer></article></body></html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Index · ColorSchemes</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link href="assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><a href="index.html"><img class="logo" src="assets/logo.png" alt="ColorSchemes logo"/></a><h1>ColorSchemes</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="search.html"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="index.html">Introduction</a></li><li><a class="toctext" href="basics.html">Basic usage</a></li><li><a class="toctext" href="inverse.html">Finding colors</a></li><li><a class="toctext" href="plotting.html">Plotting</a></li><li><a class="toctext" href="images.html">Images</a></li><li class="current"><a class="toctext" href="functionindex.html">Index</a><ul class="internal"></ul></li></ul></nav><article id="docs"><header><nav><ul><li><a href="functionindex.html">Index</a></li></ul><a class="edit-page" href="https://github.com/JuliaGraphics/ColorSchemes.jl/blob/master/docs/src/functionindex.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Index</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Index-1" href="#Index-1">Index</a></h1><ul><li><a href="basics.html#ColorSchemes.schemes"><code>ColorSchemes.schemes</code></a></li><li><a href="basics.html#Base.get"><code>Base.get</code></a></li><li><a href="images.html#ColorSchemes.colorscheme_to_image"><code>ColorSchemes.colorscheme_to_image</code></a></li><li><a href="images.html#ColorSchemes.colorscheme_to_text"><code>ColorSchemes.colorscheme_to_text</code></a></li><li><a href="basics.html#ColorSchemes.colorscheme_weighted"><code>ColorSchemes.colorscheme_weighted</code></a></li><li><a href="inverse.html#ColorSchemes.convert_to_scheme"><code>ColorSchemes.convert_to_scheme</code></a></li><li><a href="basics.html#ColorSchemes.extract"><code>ColorSchemes.extract</code></a></li><li><a href="basics.html#ColorSchemes.extract_weighted_colors"><code>ColorSchemes.extract_weighted_colors</code></a></li><li><a href="inverse.html#ColorSchemes.getinverse"><code>ColorSchemes.getinverse</code></a></li><li><a href="images.html#ColorSchemes.image_to_swatch"><code>ColorSchemes.image_to_swatch</code></a></li><li><a href="basics.html#ColorSchemes.sortcolorscheme"><code>ColorSchemes.sortcolorscheme</code></a></li><li><a href="images.html#ColorSchemes.@reg"><code>ColorSchemes.@reg</code></a></li></ul><footer><hr/><a class="previous" href="images.html"><span class="direction">Previous</span><span class="title">Images</span></a></footer></article></body></html>
Loading

0 comments on commit 63198c0

Please sign in to comment.