Code covered by the BSD License  

Highlights from
HTML Indexer

image thumbnail

HTML Indexer

by

 

16 Aug 2004 (Updated )

automated multi-language html index, index for print, batch image scaling

uNet2Dec(netColor)
function [rgb, netColor] = uNet2Dec(netColor)

if nargin< 1 netColor = 'FF0011'; end;

for i=1:size(netColor,2)
    switch upper(netColor(i))
    case {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'A', 'B', 'C', 'D', 'E', 'F'}
        % mai nimic
        netColor(i) = upper(netColor(i));
    otherwise
        netColor(i) = '7';
    end;
end;
dummy = '777777'; dummy(1:size(netColor,2)) = netColor; netColor = dummy;


rgb(1) = hex2dec(netColor(1:2))/255;
rgb(2) = hex2dec(netColor(3:4))/255;
rgb(3) = hex2dec(netColor(5:6))/255;

Contact us