

rgb {base}                                   R Documentation

_R_G_B _C_o_l_o_r _S_p_e_c_i_f_i_c_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n_:

     This function creates ``colors'' corresponding to the
     given intensities (between 0 and 1) of the red, green
     and blue primaries.  The names argument may be used to
     provide names for the colors.

     The values returned by `rgb' can be used with a `col='
     specification in graphics functions or in `par'.

_U_s_a_g_e_:

     rgb(red, green, blue, names=NULL)

_S_e_e _A_l_s_o_:

     `rainbow', `hsv', `gray'.

_E_x_a_m_p_l_e_s_:

     rgb(0,1,0)
     u01 <- seq(0,1, length=11); all(rgb(u01,u01,u01) == gray(u01))
     reds <- rgb((0:15)/15, g=0,b=0, names=paste("red",0:15,sep="."))
     reds

