color-class            package:colorspace            R Documentation

_C_l_a_s_s "_c_o_l_o_r"

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

     Objects from the class _color_ represent colors in a number of
     color spaces.  In particular there are subclasses of color which
     correspond to RGB, CIEXYZ, CIELUV, CIELAB and polar versions of
     the last two spaces.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls to the functions 'RGB' 'XYZ',
     'LUV', 'LAB', 'polarLUV', and 'polarLAB'.  These are all
     subclasses of the virtual class _color_.

_S_l_o_t_s:

     '_c_o_o_r_d_s': An object of class '"matrix"'.

_M_e_t_h_o_d_s:

     [ 'signature(x = "color")': This method makes it possible to take
          subsets of a vector of colors.

     _c_o_e_r_c_e 'signature(from = "color", to = "RGB")': convert a color
          vector to RGB.

     _c_o_e_r_c_e 'signature(from = "color", to = "XYZ")': convert a color
          vector to XYZ.

     _c_o_e_r_c_e 'signature(from = "color", to = "LAB")': convert a color
          vector to LAB. 

     _c_o_e_r_c_e 'signature(from = "color", to = "polarLAB")': convert a
          color vector to polarLAB. 

     _c_o_e_r_c_e 'signature(from = "color", to = "HSV")': convert a color
          vector to HSV. 

     _c_o_e_r_c_e 'signature(from = "color", to = "LUV")': convert a color
          vector to LUV. 

     _c_o_e_r_c_e 'signature(from = "color", to = "polarLUV")': convert a
          color vector to polarLUV. 

     _c_o_o_r_d_s 'signature(color = "color")': extract the color coordinates
          from a color vector.

     _p_l_o_t 'signature(x = "color")': plot a color vector 

     _s_h_o_w 'signature(object = "color")': show a color vector. 

_A_u_t_h_o_r(_s):

     Ross Ihaka

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

     'RGB', 'XYZ', 'HSV', 'LAB', 'polarLAB', 'LUV', 'polarLUV',
     'mixcolor'.

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

     x = RGB(runif(1000),runif(1000),runif(1000))
     plot(as(x, "LUV"))

