The present invention is a method for controlling a roasting process of coffee beans, wherein a first group of coffee beans and a second group of coffee beans are sampled from the coffee beans during roasting steps S12; S14; Detecting the color of the surface of the first group of coffee beans S14; S44, and grinding the second group of coffee beans and detecting the color of the powder of the second group of coffee beans after grinding Step S16; frying step based at least in part on S46 and the detected surface color of the first group of coffee beans and the color of the detected powder of the second group of coffee beans We propose a method having steps S18; The present invention also provides an apparatus that uses the method described above.本発明は、コーヒー豆の炒り工程を制御するための方法であって、炒りの間に前記コーヒー豆から第1の群のコーヒー豆及び第2の群のコーヒー豆をサンプリングするステップS12;S14と、該第1の群のコーヒー豆の表面の色を検出するステップS14;S44と、該第2の群のコーヒー豆を挽き、挽いた後に該第2の群のコーヒー豆の粉の色を検出するステップS16;S46と、該第1の群のコーヒー豆の検出された表面の色、及び該第2の群のコーヒー豆の検出された粉の色に、少なくとも部分的に基づいて、炒り工程を制御するステップS18;S48と、を有する方法を提案する。本発明はまた、以上に説明された方法を用いる装置を提供する。