prism 2.1.0
prism: ^2.1.0 copied to clipboard
An optimized, zero-dependency color manipulation library for Dart & Flutter with multiple color models, accessibility tools, and pre-built palettes.
Changelog #
2.1.0 #
- Added
parse()methods for parsing color stringsRayRgb8.parse()- Parse hex (#RGB, #RRGGBB, #RRGGBBAA) and CSS rgb/rgba formatsRayRgb16.parse()- Parse RGB formats with 16-bit precisionRayHsl.parse()- Parse CSS hsl/hsla formats (legacy and modern syntax)RayOklab.parse()- Parse CSS oklab() formatRayOklch.parse()- Parse CSS oklch() formatRay.parse()- Auto-detect format and return appropriate Ray subclass
- Support for both modern (space-separated) and legacy (comma-separated) CSS syntax
- Support for modern (
/ alpha) and legacy (rgba,hsla) alpha syntax
2.0.0 #
- Private color components with named getters
- Added
with$Component()transformers to all color models - Unified
RayWithLuminance<T extends Ray>implementation - Renamed internal palette types:
Spectrum→Rainbow,RayScheme→Spectrum - Added
fixedRaysto palettes for non-converted colors (black, white)
2.0.0-beta.2 #
- Unified RGB channel access: standardized getters return 0-255 range
- Added native value getters for full bit precision
- Private primary constructors with consistent factory methods
- Removed redundant
fromArgbconstructor - Standardized constructor naming across all color models
2.0.0-beta.1 #
New Features:
- Multi-color space support: HSL, Oklab, Oklch alongside RGB8/RGB16
- Perceptually uniform color operations via Oklab
- Intelligent color schemes with accessibility tools
- Pre-built palettes: CSS, Material, OpenColor, Rainbow
- Palette generation tools with PNG and CSS output
Breaking Changes:
- Split
RayRgbintoRayRgb8(8-bit) andRayRgb16(16-bit) - Updated API structure for multiple color spaces
- Enhanced palette system with pre-computed schemes
1.0.0 #
- Initial release of Prism - a comprehensive color manipulation library
- Ray class: Clean, intuitive API for color operations
- Multiple formats: Support for RGB, ARGB, hex strings, and CSS strings
- Dual hex format support: Both web standard (RGBA) and Flutter/Android (ARGB) formats
- Performance optimized: Efficient bit operations with zero dependencies
- Type safe: Comprehensive error handling and validation
- WCAG compliance: Luminance calculations for accessibility
- Color operations: Interpolation, inversion, opacity/alpha manipulation
- Flutter compatible: Internal ARGB format matches Flutter's Color class
- Comprehensive test coverage: 38+ tests covering all functionality