Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error using color "orange"

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:

Ashampoo_Snap_2017.11.24_13h48m57s_001_.jpg

The way I use "orange", another color and the hex code is shown here:

Ashampoo_Snap_2017.11.24_13h49m10s_002_.jpg

 

In summary it's no problem for me, because I use the hex code - unfortunately it used some time to locate the error.

 

Capitano

 

 

Best Answer
0 Votes
5 REPLIES 5

"magenta" also causes this issue.

Best Answer
0 Votes

Have you tried using "fb-orange" and so on?

Best Answer
0 Votes

That is a different color and both orange and magenta are in the CSS Guide.

Best Answer
0 Votes

Thanks for reporting this, I've filed a bug report.

Best Answer

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 

 

Spoiler
Unhandled exception: TypeError: Cannot set property to '"black"'. Invalid value: Expecting String ('color name' or '#hex') or Nu

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)

 

Spoiler
TypeError: Cannot set property to 'fb-"black"'. Invalid value: Expecting String ('color name' or '#hex')

 

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.  ✌️

Best Answer
0 Votes