"""Chart rendering for NOAA tide and conditions data. Optional dependency — requires noaa-tides[viz] to be installed. """ # Marine color palette — shared across all chart renderers OCEAN_BLUE = "#1B4F72" TEAL = "#148F77" SLATE = "#5D6D7E" SAND = "#D4A017" CORAL = "#E74C3C" BG_COLOR = "#FAFAFA" GRID_COLOR = "#E0E0E0" def check_deps(format: str) -> None: """Raise ValueError with install hint if visualization deps are missing.""" if format == "png": try: import matplotlib # noqa: F401 except ImportError: raise ValueError( "PNG charts require matplotlib. Install with: " "uv pip install noaa-tides[viz]" ) elif format == "html": try: import plotly # noqa: F401 except ImportError: raise ValueError( "HTML charts require plotly. Install with: " "uv pip install noaa-tides[viz]" )