11-24-2017 04:56 - edited 11-24-2017 05:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-24-2017 04:56 - edited 11-24-2017 05:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
When I use the color "orange" I always get an error which doesn't occure when I'm using the hex code instead:
The error message is shown in this picture:
The way I use "orange", another color and the hex code is shown here:
In summary it's no problem for me, because I use the hex code - unfortunately it used some time to locate the error.
Capitano

11-24-2017 05:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-24-2017 05:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
"magenta" also causes this issue.

11-24-2017 14:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-24-2017 14:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Have you tried using "fb-orange" and so on?

11-24-2017 16:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-24-2017 16:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
That is a different color and both orange and magenta are in the CSS Guide.

11-27-2017 12:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-27-2017 12:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Thanks for reporting this, I've filed a bug report.
02-01-2021 03:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-01-2021 03:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
This post may be a bit old to see replies, but if you are reading this, probably you faced this error today:
Unhandled exception: TypeError: Cannot set property to '"black"'. Invalid value: Expecting String ('color name' or '#hex') or Nu
Here is how I fixed it.
I was trying to set a background color on my app using ... something like this
let colorBackground ="black";
bg.style.fill = colorBackground;
I got the error
Then after reading this page I changed it to something like
bg.style.fill = "fb-"+colorBackground;
still no luck , got the similar error (not the same)
there is the catch , after reading it closely I observed 'fb-"black"' extra pair of " double quotes
'fb-"black"'
so I wrote a regex to remove extra pair of " double quotes
bg.style.fill = colorBackground.replace(/^"(.*)"$/, '$1');
voila ! it worked. ✌️

