[vector_graphics_compiler] Fix HSL color parsing for decimal percentage components (#11619)
## Description
Fixes a bug in the HSL color parser where decimal percentage components
(e.g. `76.2745098039%`) were incorrectly multiplied by `2.55` — the
conversion factor used for **rgb** percentages (percent → 0–255). For
**hsl**, saturation and lightness must stay in the 0–100 range (later
divided by 100) so the multiplication produced wildly wrong values
(e.g. `76.27 → 194`, then `194 / 100 = 1.94`).
The same branch also mis-handled the `hsla` alpha component: a unitless
decimal like `0.5` should be converted to 0–255 via `× 255`, not `× 2.55`.
### Root cause
`parser.dart` checked `rawColor.contains('.')` and unconditionally
applied `* 2.55`, regardless of whether the current function was
`rgb()`/`rgba()` (correct) or `hsl()`/`hsla()` (incorrect).
### Fix
Track whether each token had a `%` suffix before stripping it.
For HSL percentage components, return the raw `double` (0–100 range).
For unitless alpha decimals (0–1 range), multiply by 255.
### Reproduction (from issue #185833)
```
hsl(270, 100%, 76.2745098039%)
```
| Before fix | After fix |
|---|---|
| `#efdeff` ❌ | `#c286ff` ✓ |
## Tests
Four new tests added to `parsers_test.dart`:
- `hsl` with integer percentages (regression)
- `hsl` with decimal lightness percentage (the reported bug)
- `hsla` with integer percentages + decimal alpha (regression)
- `hsla` with decimal lightness + decimal alpha (combined case)
## Related Issues
Fixes https://github.com/flutter/flutter/issues/185833This 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: