How shelepuginivan/color works
Core Components Organization
a. Public API Layer (Top)
• Entry points: parse.go, must.go
• Utility functions: wheel.go, mix.go, shades.go, luminance.go
b. Internal Layer (Middle)
• Internal package components:
• degrees package for angle calculations
• percents package for percentage handling
• util.go for shared utilities
Component Relationships
• Dependencies on internal packages
• Rectangle: Public API components
• Circle: Internal utilities
Key Aspects to Highlight
• Conversion paths between spaces
b. Core Operations:
• Parse function entry point
• Shade/tone generation
c. Internal Utilities:
Implementation Details
• Green: Utility functions
• Orange: Core types
• Gray: Internal packages
Important Architectural Notes
• Chainable API design
• Validation and error handling flow through Must functions
• Test coverage relationship (each component has a corresponding _test.go file)