import 'package:flutter/material.dart'; /// The 6 MPOB grading classes, in canonical display order. const List mpobClasses = ['Ripe', 'Unripe', 'Underripe', 'Overripe', 'Abnormal', 'Empty_Bunch']; /// MPOB-standard ripeness color palette, shared across bounding box /// overlays, result sheets, and history/report views. Color getMPOBColor(String label) { switch (label) { case 'Ripe': return const Color(0xFF22C55E); // Industrial Green case 'Underripe': return const Color(0xFFFBBF24); // Industrial Orange/Yellow case 'Unripe': return const Color(0xFF3B82F6); // Industrial Blue case 'Abnormal': return const Color(0xFFDC2626); // Critical Red case 'Empty_Bunch': return const Color(0xFF64748B); // Waste Gray default: return Colors.yellow; } } /// Coarser 3-way health/alert grouping (red = alert, green = good quality, /// orange = warning) used in result sheets and history summaries, as /// opposed to [getMPOBColor]'s per-class palette used on bounding boxes. Color getStatusColor(String label) { if (label == 'Empty_Bunch' || label == 'Abnormal') return const Color(0xFFF44336); if (label == 'Ripe' || label == 'Overripe') return const Color(0xFF4CAF50); return const Color(0xFFFF9800); }