Palette

Version 1.0.1 (4.11 KB) by Moreno, M.
Simple yet complete colormap generation or processing tool for scientific visualisation.

18 Downloads

Updated 20 May 2022

View License

Syntax
c = palette
c = palette('data', x)
c = palette('scheme', 8)
c = palette('scheme', 7, 'alpha', 0.9)
c = palette('scheme', 4, 'format', 'hex')
c = palette('scheme', 3, 'range', [0.2 1])
c = palette('scheme', -1, 'resolution', 12)
c = palette('scheme', -5, 'highlight', [0.5 1])
Description
c = palette(varargin) generates a colormap 'c' with the settings in varargin:
  • data: User-defined RGB or HEX color vector to use or process.
  • scheme: Use one of the default schemes (1 to 10 or -1 to -10 for inverse scales).
  • resolution: Number of elements for the output color vector.
  • range: Trim color scale to a range within 0 and 1.
  • highlight: Apply colormap to a data range within 0 and 1.
  • alpha: Transparency value between 0 and 1.
  • format: RGB (default) or HEX format for output color vector.
The color schemes used in the default maps are the following, sorted in order from 1 to 10:

Cite As

Moreno, M. (2023). Palette (https://www.mathworks.com/matlabcentral/fileexchange/111920-palette), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.1

Description text typo

1.0.0