Weed management in agriculture is critical for preventing crop yield losses, with traditional methods often leading to environmental harm and increased production costs. This study explores the development of color indices and models for weed detection in computer vision-based herbicide spraying applications. Among the all sensors, RGB colour cameras offer several advantages, including low cost and wide availability of image processing libraries tailored for RGB image analysis. In present study a Logitech C270 webcam was used for acquiring the RGB images and a specially python algorithm was developed for image segmentation based on color. Excess Green (ExG), Excess Red (ExR), Excess Green minus Red (ExGR), HSV, and CIELAB color model images are developed by using algorithm. The research demonstrates that while ExG and ExGR indices are effective under specific conditions, the CIELAB model offers superior segmentation results across varying lighting environments. Among all these color indices and models, particularly CIELAB, can enhance the precision of weed detection in automated herbicide applications, thereby reducing environmental impact and improving agricultural efficiency.