function value = color_rgb ( k )

%*****************************************************************************80
%
%% color_rgb() returns the RGB values for one of 20 colors.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 December 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer K: the color index.  K can be a column vector.
%    If K is outside the range 1 <= K <= 20, the mod function is
%    used to wrap it into this range.
%
%  Output:
%
%    real VALUE(*,3): the RGB coordinates of the colors indexed by K.
%    These values are triples of real numbers between 0 and 1,
%    suitable for use with MATLAB.
%
  k = mod ( k - 1, 20 ) + 1;

  rgb = [
    128,   0,   0;
    230,  25,  75;
    250, 190, 212;
    170, 110,  40;
    245, 130,  48;
    255, 215, 180;
    128, 128,   0;
    255, 255,  25;
    255, 255, 200;
    210, 245,  60;
     60, 180,  75;
    170, 255, 195;
      0, 128, 128;
     70, 240, 240;
      0,   0, 128;
      0, 130, 200;
    145,  30, 180;
    220, 190, 255;
    240,  50, 230;
    128, 128, 128 ] / 255;
%
%  Try to lighten the murky colors.
%
  value = sqrt ( sqrt ( rgb(k,1:3) ) );

  return
end

