项目作者: JuliaGraphics

项目描述 :
colorschemes, colormaps, gradients, and palettes
高级语言: Julia
项目地址: git://github.com/JuliaGraphics/ColorSchemes.jl.git
创建时间: 2015-12-02T17:43:25Z
项目社区:https://github.com/JuliaGraphics/ColorSchemes.jl

开源协议:Other

下载


Documentation Build Status Code Coverage
Build Status

"colorschemes social media preview"

ColorSchemes

This package provides a collection of colorschemes:

  • scientifically devised colorschemes from ColorBrewer, CMOcean, ScientificColorMaps, ColorCet, and Seaborn
  • 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

Note that the schemes contained here are a mixture:

  • some are high quality color maps with consistent perceptual contrast over their full range
  • others are designed for general purpose and informal graphics work

Choose colorschemes with care! Refer to Peter Kovesi’s PerceptualColourMaps package, or to Fabio Crameri’s Scientific Colour Maps for more information.

If you want to make more advanced ColorSchemes, use linear-segment dictionaries or indexed lists, and use functions to generate color values, see the make_colorscheme() function in the ColorSchemeTools.jl package.

Basic usage

  1. ] add ColorSchemes
  2. using ColorSchemes
  3. ColorSchemes.Purples_5
  4. # => a ColorScheme
  5. colorschemes[:Purples_5]
  6. # => a ColorScheme
  7. ColorSchemes.Purples_5.colors
  8. # => array of five RGB colors
  9. ColorSchemes.Purples_5.colors[3]
  10. # => the third color in the colorscheme
  11. get(ColorSchemes.Purples_5, 0.5)
  12. # => the midway point of the colorscheme
  13. colorschemes
  14. # => Dict{Symbol, ColorScheme} with 983 entries
  15. findcolorscheme("purple")
  16. # => display list of matching schemes
  17. ColorScheme([colorant"red", colorant"green", colorant"blue"])
  18. # new colorscheme from Colors.jl named colors
  19. get(ColorSchemes.darkrainbow, range(0.0, 1.0, length=20)) |> ColorScheme
  20. # new colorscheme by resampling existing