function value = t_color_rgb ( k )

%*****************************************************************************80
%
%% t_color_rgb() returns the RGB values for one of several colors.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 January 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer K: the color index.  K can be a column vector.
%    If K is outside the range, 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, 4 ) + 1;

  rgb = [
    255,   0,   0;
      0, 255,   0;
      0,   0, 255;
    255, 255,   0 ] / 255;

  value = rgb(k,1:3);

  return
end

