1. A method for providing a function of a portable terminal, comprising: activating a color sensor upon execution of an application; displaying a color recognized by the color sensor on screen data corresponding to the executed application; and controlling a function based on the color recognized by the executed application, wherein the color sensor measures a light amount and a color of a periphery to distinguish Red, Green and Blue using a difference in wavelengths, and wherein the controlling of the function comprises: comparing a comparison color provided on the screen data with the recognized color when a user interaction is input after inputting and displaying the recognized color; outputting the recognized color, color information of the recognized color, and a congratulation message when the comparison color is identical with the recognized color; and outputting the recognized color, color information of the recognized color, and an error message when the comparison color differs from the recognized color.