added new parameter to specify color components in constructor for convenience.