@@ -265,8 +265,8 @@ string IFormattable.ToString(string format, IFormatProvider provider)
265
265
}
266
266
267
267
/// <summary>
268
- /// Creates a string representation of this object based on the format string
269
- /// and IFormatProvider passed in.
268
+ /// Creates a string representation of this object based on the format string
269
+ /// and IFormatProvider passed in.
270
270
/// If the provider is null, the CurrentCulture is used.
271
271
/// See the documentation for IFormattable for more information.
272
272
/// </summary>
@@ -303,10 +303,14 @@ internal string ConvertToString(string format, IFormatProvider provider)
303
303
String uriString = safeUnescapedUri . GetComponents ( UriComponents . SerializationInfoString , UriFormat . UriEscaped ) ;
304
304
305
305
var sb = new StringBuilder ( ) ;
306
- sb . Append ( provider , $ "{ Parsers . s_ContextColor } { uriString } { scRgbColor . a : R} ") ;
306
+ sb . Append ( provider , $ "{ Parsers . s_ContextColor } { uriString } { scRgbColor . a : R} { separator } ") ;
307
307
for ( int i = 0 ; i < nativeColorValue . Length ; ++ i )
308
308
{
309
- sb . Append ( provider , $ "{ separator } { nativeColorValue [ i ] : R} ") ;
309
+ sb . Append ( provider , $ "{ nativeColorValue [ i ] : R} ") ;
310
+ if ( i < nativeColorValue . GetLength ( 0 ) - 1 )
311
+ {
312
+ sb . Append ( provider , $ "{ separator } ") ;
313
+ }
310
314
}
311
315
return sb . ToString ( ) ;
312
316
}
@@ -413,7 +417,7 @@ public float[] GetNativeColorValues()
413
417
{
414
418
Color c1 = new Color ( ) ;
415
419
c1 . context = color1 . context ;
416
-
420
+
417
421
#pragma warning suppress 6506 // c1.context is obviously not null - both color1.context AND color2.context are not null
418
422
c1 . nativeColorValue = new float [ c1 . context . NumChannels ] ;
419
423
for ( int i = 0 ; i < c1 . nativeColorValue . GetLength ( 0 ) ; i ++ )
0 commit comments