We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9eb5fb commit 1f6d854Copy full SHA for 1f6d854
1 file changed
Latex4PowerPoint/AddinUtilities.cs
@@ -122,10 +122,12 @@ public static Color stringToColor(string colorText)
122
{
123
return Color.Black;
124
}
125
+ System.Globalization.CultureInfo ci;
126
+ ci = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
127
string[] col = colorText.Split(',');
- float fred = Convert.ToSingle(col[0].Replace('.', ',')) * 255.0f;
- float fgreen = Convert.ToSingle(col[1].Replace('.', ',')) * 255.0f;
128
- float fblue = Convert.ToSingle(col[2].Replace('.', ',')) * 255.0f;
+ float fred = Convert.ToSingle(col[0], ci) * 255.0f;
129
+ float fgreen = Convert.ToSingle(col[1], ci) * 255.0f;
130
+ float fblue = Convert.ToSingle(col[2], ci) * 255.0f;
131
return Color.FromArgb((int)fred, (int)fgreen, (int)fblue);
132
133
0 commit comments