Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting from hsl or hsv: Error: Expected a value of type 'ListBase<num>', but got one of type 'List<num>'" #1

Open
mymikemiller opened this issue Dec 14, 2020 · 1 comment

Comments

@mymikemiller
Copy link

Attempting any conversion from hsl or hsv results in the error. For example, I can convert black from rgb to hsl, but not vice versa:

convert.rgb.hsl(0, 0, 0);
_ConversionResult ([0, 0, 0, 100])
convert.hsl.rgb(0, 0, 0);
"Error: Expected a value of type 'ListBase<num>', but got one of type 'List<num>'"

I can't get any conversion from hsl or hsv to give me anything other than the above error. The following returns null:

convert.hsv.rgb(convert.ListBase(0, 100, 100))

@mymikemiller
Copy link
Author

I was able to use Flutter's built in color tools to satisfy my needs:

import 'package:flutter/painting.dart';
var rgb = HSVColor.fromAHSV(1, 360, 1, .5).toColor()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant