function srgbn = srgbnorm(R, G, B)
% srgbnorm:  String defining normalized RGB triple.
%   srgbnorm(R, G, B) where R, G and B are integers in the range 0 .. 255.
   if nargin ~= 3 
      error('Must supply three arguments');
   end
   if R < 0 | R > 255 | fix(R) ~= R
      error('R must be an integer in the range 0 .. 255');
   end
   if G < 0 | G > 255 | fix(G) ~= G
      error('G must be an integer in the range 0 .. 255');
   end
   if B < 0 | B > 255 | fix(B) ~= B
      error('B must be an integer in the range 0 .. 255');
   end
   rgbn = [R, G, B] / 255;
   srgbn = sprintf('[%.2f, %.2f, %.2f]', rgbn(1), rgbn(2), rgbn(3));
end
