Monitoring anthocyanins is essential for assessing nutritional value and the growth status of plants. This study aimed to utilize hyperspectral technology to non-destructively monitor anthocyanin levels. Spectral data were preprocessed using standard normal variate (SNV) and first-derivative (FD) spectral processing. Feature wavelengths were selected using uninformative variable elimination (UVE) and UVE combined with competitive adaptive reweighted sampling (UVE + CARS). The optimal two-band vegetation index (VI2) and three-band vegetation index (VI3) were then calculated. Finally, dung beetle optimization (DBO), subtraction-average-based optimization (SABO), and the whale optimization algorithm (WOA) optimized the extreme learning machine (ELM) for modeling. The results indicated the following: (1) For the feature band selection methods, the UVE-CARS-SNV-DBO-ELM model achieved an Rm2 of 0.8623, an RMSEm of 0.0098, an Rv2 of 0.8617, and an RMSEv of 0.0095, resulting in an RPD of 2.7192, further demonstrating that UVE-CARS enhances feature band extraction based on UVE and indicating a strong model performance. (2) For the vegetation index, VI3 showed a better predictive accuracy than VI2. The VI3-WOA-ELM model achieved an Rm2 of 0.8348, an RMSEm of 0.0109 mg/g, an Rv2 of 0.812, an RMSEv of 0.011 mg/g, and an RPD of 2.3323, demonstrating good performance. (3) For the optimization algorithms, the DBO, SABO, and WOA all performed well in optimizing the ELM model. The R2 of the DBO model increased by 5.8% to 27.82%, that of the SABO model by 2.92% to 26.84%, and that of the WOA model by 3.75% to 27.51%. These findings offer valuable insights for future anthocyanin monitoring using hyperspectral technology, highlighting the effectiveness of feature selection and optimization algorithms for accurate detection.