40 references to FromScRgb
PresentationCore (6)
MS\Internal\AnimatedTypeHelpers.cs (1)
767return Color.FromScRgb(0.0F, 0.0F, 0.0F, 0.0F);
System\Windows\Media\Color.cs (3)
400Color c1 = FromScRgb( 512Color c1 = FromScRgb( 626Color c1 = FromScRgb(color.scRgbColor.a * coefficient, color.scRgbColor.r * coefficient, color.scRgbColor.g * coefficient, color.scRgbColor.b * coefficient);
System\Windows\Media\Parsers.cs (2)
167return Color.FromScRgb(values[0], values[1], values[2], values[3]); 171return Color.FromScRgb(1.0f, values[0], values[1], values[2]);
PresentationCore.Tests (32)
System\Windows\Media\ColorConverter.Tests.cs (16)
178yield return new object[] { Color.FromScRgb(1f, 1f, 0f, 0f), "sc#1,1,0,0" }; // Fully opaque red 179yield return new object[] { Color.FromScRgb(1f, 0f, 1f, 0f), "sc#1,0,1,0" }; // Fully opaque green 180yield return new object[] { Color.FromScRgb(1f, 0f, 0f, 1f), "sc#1,0,0,1" }; // Fully opaque blue 181yield return new object[] { Color.FromScRgb(0.5f, 1f, 1f, 0f), "sc#0.5,1,1,0" }; // Semi-transparent yellow 182yield return new object[] { Color.FromScRgb(0f, 0f, 0f, 0f), "sc#0,0,0,0" }; // Fully transparent black 183yield return new object[] { Color.FromScRgb(1f, 0.5f, 0.5f, 0.5f), "sc#1,0.5,0.5,0.5" }; // Fully opaque gray 184yield return new object[] { Color.FromScRgb(0.75f, 0.5f, 0f, 0.5f), "sc#0.75,0.5,0,0.5" }; // Semi-transparent purple 186yield return new object[] { Color.FromScRgb(1f, 1f, 0f, 0f), "sc#1, 1, 0, 0" }; // Extra space after commas 187yield return new object[] { Color.FromScRgb(1f, 1f, 0f, 0f), " sc#1,1,0,0" }; // Leading space 188yield return new object[] { Color.FromScRgb(1f, 1f, 0f, 0f), "sc#1,1,0,0 " }; // Trailing space 189yield return new object[] { Color.FromScRgb(1f, 1f, 0f, 0f), " sc#1,1,0,0 " }; // Excessive surrounding whitespace 190yield return new object[] { Color.FromScRgb(0.9f, 0.8f, 0.7f, 0.6f), "sc#0.9,0.8,0.7,0.6" }; // Non-integer values 191yield return new object[] { Color.FromScRgb(1f, 0.12345f, 0.6789f, 0.54321f), "sc#1,0.12345,0.6789,0.54321" }; // Values with extended precision 192yield return new object[] { Color.FromScRgb(0f, 1f, 0f, 0f), "sc#0 ,1 ,0 ,0" }; // Spaces directly around commas 193yield return new object[] { Color.FromScRgb(0.5f, 0.5f, 0.5f, 0.5f), "sc# .5 , .5 , .5 , .5" }; // Leading decimals with spaces 194yield return new object[] { Color.FromScRgb(0.75f, 0.5f, 0f, 0.5f), "sc#0.75,0.50,0.00,0.50" }; // Explicit zero padding
System\Windows\Media\Generated\BrushConverter.Tests.cs (16)
155yield return new object[] { new SolidColorBrush(Color.FromScRgb(1f, 1f, 0f, 0f)), "sc#1,1,0,0" }; // Fully opaque red 156yield return new object[] { new SolidColorBrush(Color.FromScRgb(1f, 0f, 1f, 0f)), "sc#1,0,1,0" }; // Fully opaque green 157yield return new object[] { new SolidColorBrush(Color.FromScRgb(1f, 0f, 0f, 1f)), "sc#1,0,0,1" }; // Fully opaque blue 158yield return new object[] { new SolidColorBrush(Color.FromScRgb(0.5f, 1f, 1f, 0f)), "sc#0.5,1,1,0" }; // Semi-transparent yellow 159yield return new object[] { new SolidColorBrush(Color.FromScRgb(0f, 0f, 0f, 0f)), "sc#0,0,0,0" }; // Fully transparent black 160yield return new object[] { new SolidColorBrush(Color.FromScRgb(1f, 0.5f, 0.5f, 0.5f)), "sc#1,0.5,0.5,0.5" }; // Fully opaque gray 161yield return new object[] { new SolidColorBrush(Color.FromScRgb(0.75f, 0.5f, 0f, 0.5f)), "sc#0.75,0.5,0,0.5" }; // Semi-transparent purple 163yield return new object[] { new SolidColorBrush(Color.FromScRgb(1f, 1f, 0f, 0f)), "sc#1, 1, 0, 0" }; // Extra space after commas 164yield return new object[] { new SolidColorBrush(Color.FromScRgb(1f, 1f, 0f, 0f)), " sc#1,1,0,0" }; // Leading space 165yield return new object[] { new SolidColorBrush(Color.FromScRgb(1f, 1f, 0f, 0f)), "sc#1,1,0,0 " }; // Trailing space 166yield return new object[] { new SolidColorBrush(Color.FromScRgb(1f, 1f, 0f, 0f)), " sc#1,1,0,0 " }; // Excessive surrounding whitespace 167yield return new object[] { new SolidColorBrush(Color.FromScRgb(0.9f, 0.8f, 0.7f, 0.6f)), "sc#0.9,0.8,0.7,0.6" }; // Non-integer values 168yield return new object[] { new SolidColorBrush(Color.FromScRgb(1f, 0.12345f, 0.6789f, 0.54321f)), "sc#1,0.12345,0.6789,0.54321" }; // Values with extended precision 169yield return new object[] { new SolidColorBrush(Color.FromScRgb(0f, 1f, 0f, 0f)), "sc#0 ,1 ,0 ,0" }; // Spaces directly around commas 170yield return new object[] { new SolidColorBrush(Color.FromScRgb(0.5f, 0.5f, 0.5f, 0.5f)), "sc# .5 , .5 , .5 , .5" }; // Leading decimals with spaces 171yield return new object[] { new SolidColorBrush(Color.FromScRgb(0.75f, 0.5f, 0f, 0.5f)), "sc#0.75,0.50,0.00,0.50" }; // Explicit zero padding
ReachFramework (2)
AlphaFlattener\BrushProxy.cs (2)
2076blend = Color.FromScRgb( 3682return Color.FromScRgb(m_a, m_r, m_g, m_b);