function B = skin_tone ( A )

%*****************************************************************************80
%
%% SKIN_TONE...
%
  [ m, n, k ] = size ( A );

  rstar = 0.4061;
  gstar = 0.3105;
  bstar = 0.2834;

  dmax = 0.03;

  B = A;

  for j = 1 : n
    for i = 1 : m

      r = double ( A(i,j,1) );
      g = double ( A(i,j,2) );
      b = double ( A(i,j,3) );

      intens = r + g + b;

      rbar = r / intens;
      gbar = g / intens;
      bbar = b / intens;

      d = sqrt ( ( rbar - rstar )^2 ...
               + ( gbar - gstar )^2 ...
               + ( bbar - bstar )^2 );

      if ( dmax < d )
        B(i,j,1:3) = 0;
      else
        B(i,j,1:3) = A(i,j,1:3);
      end

    end
  end

  return
end
