[vector_graphics_compiler] Add modern HSL color parsing (#11657) ## Description Follow-up to flutter/packages#11619 and flutter/flutter#185833. This moves HSL/HSLA function parsing from `parser.dart` into `colors.dart`, following the existing `parseCssRgb` / `parseRgbFunction` structure. It also adds support for the same practical legacy/modern syntax split already supported for RGB: - legacy comma-separated syntax, e.g. `hsl(270, 100%, 76%)` - modern space-separated syntax, e.g. `hsl(270 100% 76% / 0.5)` This is intentionally scoped to the existing regex-based numeric parser style; it does not attempt to implement the full CSS Color 4 grammar. ## Tests - Added `parseCssHsl` record parser tests covering legacy syntax, modern syntax, whitespace/case variations, decimal/negative tokens, and invalid syntax. - Added `SvgParser.parseColor` tests for modern HSL/HSLA conversion and HSLA alpha behavior. - Added HSLA alpha boundary and clamp tests for `0`, `0%`, `1`, `100%`, `50%`, `-0.5`, `-10%`, `2`, and `150%`. Ran locally: ```sh flutter test test/colors_test.dart test/parsers_test.dart dart analyze lib/src/svg/colors.dart lib/src/svg/parser.dart test/colors_test.dart test/parsers_test.dart ``` ## Related Issues Fixes https://github.com/flutter/flutter/issues/186153
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.
These packages are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled “package”.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.
These are the packages hosted in this repository: