function c = roseus(m) %ROSEUS 'roseus' colormap used in audacity for improved spectrum visualization % % c = ROSEUS(M) returns an M-by-3 matrix containing a 'roseus' colormap. % ROSEUS, by itself, uses the length of the current figure's colormap. % % It works like the other colormaps: hot, hsv, parula, gray,... % Adjust the color limits of the spectrum image to mimic the audacity spectrum. % % Usage examples: % % >>c = roseus(15); % returns a 15x3 'roseus' colormap % % >>c = roseus; % returns a Mx3 colormap % % M is the length of the current figure's colormap or 64 % % >>colormap(roseus); % sets the 'roseus' colormap on the current figure % % See also HOT, HSV, PARULA, GRAY, PINK, COOL, BONE, COPPER, FLAG, % COLORMAP, RGBPLOT. % J. Palacín, V1.0, July 2024 % http://robotica.udl.cat % roseus colormap extracted from the preview image shown in: https://github.com/dofuuz/roseus % colors extractec with improfile and converted to text using matrix2m (available at fileexchange) c = [... 0.00392,0.00392,0.00392;... 0.00392,0.00392,0.00392;... 0.00392,0.00392,0.00392;... 0.00392,0.00392,0.00392;... 0.00392,0.00392,0.00392;... 0.00392,0.00784,0.00784;... 0.00392,0.00784,0.00784;... 0.00392,0.00784,0.00784;... 0.00392,0.00784,0.00784;... 0.00784,0.0118,0.0118;... 0.00784,0.0118,0.0118;... 0.00784,0.0157,0.0157;... 0.00784,0.0157,0.0157;... 0.00784,0.0196,0.0196;... 0.00784,0.0196,0.0196;... 0.00784,0.0196,0.0235;... 0.00784,0.0196,0.0235;... 0.00784,0.0235,0.0314;... 0.00784,0.0235,0.0314;... 0.00784,0.0314,0.0392;... 0.00784,0.0353,0.0431;... 0.00784,0.0353,0.0431;... 0.00784,0.0392,0.051;... 0.00784,0.0392,0.051;... 0.00784,0.0431,0.0588;... 0.00784,0.0431,0.0588;... 0.00784,0.0471,0.0667;... 0.00784,0.0471,0.0667;... 0.00784,0.051,0.0745;... 0.00784,0.051,0.0745;... 0.00784,0.0549,0.0824;... 0.00784,0.0549,0.0824;... 0.00784,0.0627,0.0902;... 0.00784,0.0627,0.0902;... 0.00784,0.0667,0.098;... 0.00784,0.0667,0.098;... 0.00392,0.0706,0.106;... 0.00392,0.0706,0.106;... 0.00392,0.0745,0.114;... 0.00392,0.0745,0.114;... 0.00392,0.0784,0.122;... 0.00392,0.0784,0.122;... 0.00392,0.0824,0.129;... 0.00392,0.0824,0.129;... 0.00392,0.0863,0.141;... 0.00392,0.0863,0.141;... 0,0.0902,0.149;... 0,0.0902,0.149;... 0,0.0902,0.157;... 0,0.0902,0.157;... 0,0.0941,0.165;... 0,0.0941,0.165;... 0,0.098,0.176;... 0,0.098,0.176;... 0,0.102,0.184;... 0,0.102,0.184;... 0,0.106,0.192;... 0,0.106,0.192;... 0,0.11,0.204;... 0,0.11,0.204;... 0,0.11,0.212;... 0,0.11,0.212;... 0,0.114,0.22;... 0,0.114,0.22;... 0,0.118,0.231;... 0,0.118,0.231;... 0,0.122,0.239;... 0,0.122,0.239;... 0,0.122,0.251;... 0,0.122,0.251;... 0.00392,0.125,0.259;... 0.00392,0.125,0.259;... 0.00784,0.125,0.271;... 0.00784,0.125,0.271;... 0.00784,0.129,0.278;... 0.00784,0.129,0.278;... 0.0118,0.133,0.29;... 0.0118,0.133,0.29;... 0.0157,0.133,0.298;... 0.0157,0.133,0.298;... 0.0235,0.137,0.31;... 0.0275,0.137,0.318;... 0.0275,0.137,0.318;... 0.0353,0.137,0.329;... 0.0353,0.137,0.329;... 0.0431,0.141,0.337;... 0.0431,0.141,0.337;... 0.0471,0.141,0.345;... 0.0471,0.141,0.345;... 0.0549,0.141,0.357;... 0.0549,0.141,0.357;... 0.0627,0.145,0.365;... 0.0627,0.145,0.365;... 0.0706,0.145,0.376;... 0.0706,0.145,0.376;... 0.0784,0.145,0.384;... 0.0784,0.145,0.384;... 0.0863,0.145,0.396;... 0.0863,0.145,0.396;... 0.0941,0.149,0.404;... 0.0941,0.149,0.404;... 0.102,0.149,0.416;... 0.102,0.149,0.416;... 0.11,0.149,0.424;... 0.11,0.149,0.424;... 0.122,0.149,0.431;... 0.122,0.149,0.431;... 0.129,0.149,0.443;... 0.129,0.149,0.443;... 0.137,0.149,0.451;... 0.137,0.149,0.451;... 0.145,0.149,0.459;... 0.145,0.149,0.459;... 0.153,0.149,0.467;... 0.153,0.149,0.467;... 0.161,0.149,0.475;... 0.161,0.149,0.475;... 0.173,0.149,0.486;... 0.173,0.149,0.486;... 0.18,0.145,0.494;... 0.18,0.145,0.494;... 0.188,0.145,0.502;... 0.188,0.145,0.502;... 0.196,0.145,0.51;... 0.196,0.145,0.51;... 0.208,0.145,0.518;... 0.208,0.145,0.518;... 0.216,0.145,0.522;... 0.216,0.145,0.522;... 0.224,0.141,0.529;... 0.224,0.141,0.529;... 0.235,0.141,0.537;... 0.235,0.141,0.537;... 0.243,0.141,0.545;... 0.243,0.141,0.545;... 0.251,0.137,0.553;... 0.251,0.137,0.553;... 0.263,0.137,0.557;... 0.263,0.137,0.557;... 0.271,0.133,0.565;... 0.271,0.133,0.565;... 0.278,0.133,0.569;... 0.278,0.133,0.569;... 0.29,0.133,0.576;... 0.29,0.133,0.576;... 0.298,0.129,0.58;... 0.298,0.129,0.58;... 0.306,0.129,0.584;... 0.318,0.125,0.592;... 0.318,0.125,0.592;... 0.325,0.125,0.596;... 0.325,0.125,0.596;... 0.333,0.122,0.6;... 0.333,0.122,0.6;... 0.345,0.122,0.604;... 0.345,0.122,0.604;... 0.353,0.118,0.608;... 0.353,0.118,0.608;... 0.365,0.114,0.612;... 0.365,0.114,0.612;... 0.373,0.114,0.616;... 0.373,0.114,0.616;... 0.38,0.11,0.616;... 0.38,0.11,0.616;... 0.392,0.11,0.62;... 0.392,0.11,0.62;... 0.4,0.106,0.624;... 0.4,0.106,0.624;... 0.408,0.106,0.624;... 0.408,0.106,0.624;... 0.42,0.102,0.627;... 0.42,0.102,0.627;... 0.427,0.102,0.627;... 0.427,0.102,0.627;... 0.439,0.098,0.631;... 0.439,0.098,0.631;... 0.447,0.098,0.631;... 0.447,0.098,0.631;... 0.455,0.0941,0.631;... 0.455,0.0941,0.631;... 0.467,0.0941,0.631;... 0.467,0.0941,0.631;... 0.475,0.0902,0.631;... 0.475,0.0902,0.631;... 0.482,0.0902,0.631;... 0.482,0.0902,0.631;... 0.494,0.0902,0.631;... 0.494,0.0902,0.631;... 0.502,0.0863,0.631;... 0.502,0.0863,0.631;... 0.51,0.0863,0.631;... 0.51,0.0863,0.631;... 0.518,0.0863,0.631;... 0.518,0.0863,0.631;... 0.529,0.0863,0.627;... 0.529,0.0863,0.627;... 0.537,0.0824,0.627;... 0.537,0.0824,0.627;... 0.545,0.0824,0.627;... 0.545,0.0824,0.627;... 0.553,0.0824,0.624;... 0.553,0.0824,0.624;... 0.561,0.0824,0.624;... 0.561,0.0824,0.624;... 0.573,0.0824,0.62;... 0.573,0.0824,0.62;... 0.58,0.0824,0.62;... 0.58,0.0824,0.62;... 0.588,0.0863,0.616;... 0.588,0.0863,0.616;... 0.596,0.0863,0.612;... 0.596,0.0863,0.612;... 0.604,0.0863,0.608;... 0.604,0.0863,0.608;... 0.612,0.0863,0.608;... 0.612,0.0863,0.608;... 0.62,0.0902,0.604;... 0.62,0.0902,0.604;... 0.631,0.0902,0.6;... 0.639,0.0941,0.596;... 0.639,0.0941,0.596;... 0.647,0.0941,0.592;... 0.647,0.0941,0.592;... 0.655,0.098,0.588;... 0.655,0.098,0.588;... 0.663,0.102,0.584;... 0.663,0.102,0.584;... 0.671,0.102,0.58;... 0.671,0.102,0.58;... 0.678,0.106,0.576;... 0.678,0.106,0.576;... 0.686,0.11,0.573;... 0.686,0.11,0.573;... 0.69,0.114,0.565;... 0.69,0.114,0.565;... 0.698,0.118,0.561;... 0.698,0.118,0.561;... 0.706,0.122,0.557;... 0.706,0.122,0.557;... 0.714,0.125,0.553;... 0.714,0.125,0.553;... 0.722,0.129,0.545;... 0.722,0.129,0.545;... 0.729,0.133,0.541;... 0.729,0.133,0.541;... 0.737,0.137,0.537;... 0.737,0.137,0.537;... 0.741,0.141,0.529;... 0.741,0.141,0.529;... 0.749,0.145,0.525;... 0.749,0.145,0.525;... 0.757,0.149,0.522;... 0.757,0.149,0.522;... 0.765,0.153,0.514;... 0.765,0.153,0.514;... 0.769,0.157,0.51;... 0.769,0.157,0.51;... 0.776,0.165,0.502;... 0.776,0.165,0.502;... 0.784,0.169,0.498;... 0.784,0.169,0.498;... 0.788,0.173,0.494;... 0.788,0.173,0.494;... 0.796,0.176,0.486;... 0.796,0.176,0.486;... 0.8,0.184,0.482;... 0.8,0.184,0.482;... 0.808,0.188,0.475;... 0.808,0.188,0.475;... 0.812,0.192,0.471;... 0.812,0.192,0.471;... 0.82,0.2,0.463;... 0.82,0.2,0.463;... 0.824,0.204,0.459;... 0.824,0.204,0.459;... 0.831,0.208,0.451;... 0.831,0.208,0.451;... 0.835,0.216,0.447;... 0.835,0.216,0.447;... 0.843,0.22,0.439;... 0.843,0.22,0.439;... 0.847,0.227,0.435;... 0.847,0.227,0.435;... 0.855,0.231,0.431;... 0.855,0.231,0.431;... 0.859,0.239,0.424;... 0.859,0.239,0.424;... 0.863,0.243,0.42;... 0.867,0.251,0.412;... 0.867,0.251,0.412;... 0.875,0.255,0.408;... 0.875,0.255,0.408;... 0.878,0.263,0.4;... 0.878,0.263,0.4;... 0.882,0.267,0.396;... 0.882,0.267,0.396;... 0.886,0.275,0.388;... 0.886,0.275,0.388;... 0.894,0.278,0.384;... 0.894,0.278,0.384;... 0.898,0.286,0.38;... 0.898,0.286,0.38;... 0.902,0.294,0.373;... 0.902,0.294,0.373;... 0.906,0.298,0.369;... 0.906,0.298,0.369;... 0.91,0.306,0.365;... 0.91,0.306,0.365;... 0.914,0.314,0.357;... 0.914,0.314,0.357;... 0.918,0.318,0.353;... 0.918,0.318,0.353;... 0.922,0.325,0.349;... 0.922,0.325,0.349;... 0.925,0.333,0.341;... 0.925,0.333,0.341;... 0.929,0.337,0.337;... 0.929,0.337,0.337;... 0.933,0.345,0.333;... 0.933,0.345,0.333;... 0.937,0.353,0.329;... 0.937,0.353,0.329;... 0.941,0.361,0.325;... 0.941,0.361,0.325;... 0.941,0.365,0.322;... 0.941,0.365,0.322;... 0.945,0.373,0.314;... 0.945,0.373,0.314;... 0.949,0.38,0.31;... 0.949,0.38,0.31;... 0.953,0.388,0.306;... 0.953,0.388,0.306;... 0.953,0.396,0.302;... 0.953,0.396,0.302;... 0.957,0.4,0.298;... 0.957,0.4,0.298;... 0.961,0.408,0.298;... 0.961,0.408,0.298;... 0.961,0.416,0.294;... 0.961,0.416,0.294;... 0.965,0.424,0.29;... 0.965,0.424,0.29;... 0.965,0.431,0.286;... 0.965,0.431,0.286;... 0.969,0.439,0.282;... 0.969,0.439,0.282;... 0.973,0.447,0.282;... 0.973,0.447,0.282;... 0.973,0.455,0.278;... 0.973,0.455,0.278;... 0.973,0.459,0.278;... 0.973,0.459,0.278;... 0.976,0.467,0.275;... 0.976,0.467,0.275;... 0.976,0.475,0.275;... 0.976,0.475,0.275;... 0.98,0.482,0.271;... 0.98,0.49,0.271;... 0.98,0.49,0.271;... 0.98,0.498,0.271;... 0.98,0.498,0.271;... 0.98,0.506,0.271;... 0.98,0.506,0.271;... 0.984,0.514,0.271;... 0.984,0.514,0.271;... 0.984,0.522,0.271;... 0.984,0.522,0.271;... 0.984,0.529,0.271;... 0.984,0.529,0.271;... 0.984,0.537,0.275;... 0.984,0.537,0.275;... 0.984,0.545,0.275;... 0.984,0.545,0.275;... 0.984,0.553,0.275;... 0.984,0.553,0.275;... 0.984,0.561,0.278;... 0.984,0.561,0.278;... 0.984,0.569,0.282;... 0.984,0.569,0.282;... 0.984,0.576,0.282;... 0.984,0.576,0.282;... 0.984,0.584,0.286;... 0.984,0.584,0.286;... 0.984,0.592,0.29;... 0.984,0.592,0.29;... 0.984,0.6,0.294;... 0.984,0.6,0.294;... 0.984,0.608,0.302;... 0.984,0.608,0.302;... 0.98,0.616,0.306;... 0.98,0.616,0.306;... 0.98,0.624,0.31;... 0.98,0.624,0.31;... 0.98,0.631,0.318;... 0.98,0.631,0.318;... 0.98,0.639,0.322;... 0.98,0.639,0.322;... 0.976,0.647,0.329;... 0.976,0.647,0.329;... 0.976,0.655,0.337;... 0.976,0.655,0.337;... 0.976,0.663,0.345;... 0.976,0.663,0.345;... 0.973,0.671,0.353;... 0.973,0.671,0.353;... 0.973,0.678,0.361;... 0.973,0.678,0.361;... 0.969,0.686,0.369;... 0.969,0.686,0.369;... 0.969,0.694,0.38;... 0.969,0.694,0.38;... 0.969,0.702,0.388;... 0.969,0.702,0.388;... 0.965,0.71,0.396;... 0.965,0.71,0.396;... 0.965,0.718,0.408;... 0.965,0.718,0.408;... 0.961,0.725,0.416;... 0.961,0.725,0.416;... 0.957,0.733,0.427;... 0.957,0.733,0.427;... 0.957,0.741,0.439;... 0.957,0.741,0.439;... 0.953,0.749,0.451;... 0.953,0.757,0.463;... 0.953,0.757,0.463;... 0.949,0.765,0.475;... 0.949,0.765,0.475;... 0.949,0.773,0.486;... 0.949,0.773,0.486;... 0.945,0.78,0.498;... 0.945,0.78,0.498;... 0.941,0.788,0.51;... 0.941,0.788,0.51;... 0.941,0.792,0.522;... 0.941,0.792,0.522;... 0.937,0.8,0.537;... 0.937,0.8,0.537;... 0.937,0.808,0.549;... 0.937,0.808,0.549;... 0.933,0.816,0.561;... 0.933,0.816,0.561;... 0.933,0.824,0.576;... 0.933,0.824,0.576;... 0.929,0.827,0.588;... 0.929,0.827,0.588;... 0.929,0.835,0.604;... 0.929,0.835,0.604;... 0.925,0.843,0.616;... 0.925,0.843,0.616;... 0.925,0.847,0.631;... 0.925,0.847,0.631;... 0.925,0.855,0.643;... 0.925,0.855,0.643;... 0.922,0.859,0.659;... 0.922,0.859,0.659;... 0.922,0.867,0.675;... 0.922,0.867,0.675;... 0.922,0.875,0.686;... 0.922,0.875,0.686;... 0.922,0.878,0.702;... 0.922,0.878,0.702;... 0.922,0.886,0.718;... 0.922,0.886,0.718;... 0.922,0.89,0.729;... 0.922,0.89,0.729;... 0.922,0.894,0.745;... 0.922,0.894,0.745;... 0.922,0.902,0.761;... 0.922,0.902,0.761;... 0.922,0.906,0.773;... 0.922,0.906,0.773;... 0.922,0.914,0.788;... 0.922,0.914,0.788;... 0.925,0.918,0.8;... 0.925,0.918,0.8;... 0.925,0.922,0.816;... 0.925,0.922,0.816;... 0.929,0.925,0.827;... 0.929,0.925,0.827;... 0.933,0.933,0.843;... 0.933,0.933,0.843;... 0.933,0.937,0.855;... 0.933,0.937,0.855;... 0.937,0.941,0.867;... 0.941,0.945,0.882;... 0.941,0.945,0.882;... 0.945,0.949,0.894;... 0.945,0.949,0.894;... 0.953,0.953,0.906;... 0.953,0.953,0.906;... 0.957,0.957,0.918;... 0.957,0.957,0.918;... 0.961,0.961,0.929;... 0.961,0.961,0.929;... 0.969,0.965,0.937;... 0.969,0.965,0.937;... 0.973,0.969,0.949;... 0.973,0.969,0.949;... 0.98,0.973,0.957;... 0.98,0.973,0.957;... 0.988,0.976,0.969;... 0.988,0.976,0.969;... 0.996,0.98,0.976;... 0.996,0.98,0.976;... 0.996,0.98,0.976;... ]; % get the length of the current figure colormap if nargin < 1 % check if any figure exists hfig = findall(0,'type','figure'); if ~isempty(hfig) m = size(get(hfig,'colormap'),1); else % default m = 64; end end % using the old programming style with brackets [] r = spline([1:1:506],c(:,1),linspace(1,506,m)); g = spline([1:1:506],c(:,2),linspace(1,506,m)); b = spline([1:1:506],c(:,3),linspace(1,506,m)); c = [r' g' b']; % crop to avoid spline interpolation problems c(c > 1) = 1.0; c(c < 0) = 0.0;