Ashish has the right approach, but it may be difficult for you to get all of these values from a web page and on a map that you can use. You have several options for creating a map ...
One option is to actually get the source for the page using the URLREAD function and parse the numbers you need using the REGEXP function (“ Did he just parse the HTML with a regular expression ?!” Yes, I did. What can I say? I'm a loner, Dottie, a rebel.):
mapURL = 'http://en.wikipedia.org/wiki/Web_colors
urlText = urlread(mapURL);
matchExpr = ['<td style="background: #\w{3};">' ...
'(?:<u>\*)?(\w{3})(?:\*</u>)?</td>'];
colorID = regexp(urlText,matchExpr,'tokens');
colorID = char([colorID{:}]);
[~,webSafeMap] = ismember(colorID,'0369CF');
webSafeMap = (webSafeMap-1)./5;
However, after I did this, I realized that there is a good regular structure for the safe color map values received on the network. This means that you can really ignore all the problems described above and generate the map yourself using the REPMAT and KRON functions :
colorValues = (0:0.2:1).'; %'
webSafeMap = [repmat(colorValues,36,1) ...
kron(colorValues,ones(36,1)) ...
repmat(kron(colorValues,ones(6,1)),6,1)];
, , RGB, RGB2IND IND2RGB. :
imageRGB = imread('peppers.png'); %
imageRGB = ind2rgb(rgb2ind(imageRGB,webSafeMap),webSafeMap);
imshow(imageRGB);
