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

"Unable to parse color from string" #562

Open
vincentsartoko opened this issue Oct 3, 2023 · 4 comments
Open

"Unable to parse color from string" #562

vincentsartoko opened this issue Oct 3, 2023 · 4 comments

Comments

@vincentsartoko
Copy link

I just follow what the document said, but it throws this error...

npx @capacitor/assets generate --android --assetPath /public/media/generate --androidProject ../a --iconBackgroundColor '#eeeeee' --iconBackgroundColorDark '#222222' 
--splashBackgroundColor '#eeeeee' --splashBackgroundColorDark '#111111'
Unable to generate assets Unable to parse color from string: '#eeeeee'
Error: Unable to parse color from string: '#eeeeee'
@pferreirafabricio
Copy link

Same problem here

@marcpuig
Copy link

Just remove the ' character:

npx @capacitor/assets generate --android --assetPath /public/media/generate --androidProject ../a --iconBackgroundColor #eeeeee --iconBackgroundColorDark #222222
--splashBackgroundColor #eeeeee --splashBackgroundColorDark #111111

@mathrl
Copy link

mathrl commented Apr 17, 2024

Just remove the ' character:

npx @capacitor/assets generate --android --assetPath /public/media/generate --androidProject ../a --iconBackgroundColor #eeeeee --iconBackgroundColorDark #222222 --splashBackgroundColor #eeeeee --splashBackgroundColorDark #111111

Weird because the official syntax has the ' . But yeah that fixed it, thanks!

@Meliovation
Copy link

I wish I found this comment before spending an hour trying to figure out why it could not parse my hex color string :( Can the documentation page example command line be updated to remove the single quotes? I'm not sure if I am allowed to edit the file and submit the change to the readme file.

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

5 participants