Solved my own question:
cmap_jet = colormap(jet(64)); % used colormap 'jet' with 64 colors
for j = 1:n
if skill(j) == 0;
skill_color(j,:) = ([0 0 0]); % set to black
else
% return index from 1 to 64 based upon skill level (data) from 0.0 to 1.0
% note: skill.*number_of_colors_in_colormap
% note: goal: return indexes from 1 to 64 starting with data range.
skill_color_idx(j) = uint8(ceil(skill(j).*64));
% now return cmap_jet row :RGB as color of skill
skill_color(j,:) = cmap_jet(skill_color_idx(j),:); % jet colors
end
end