Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
R G B components of a Brush in NT8?
Collapse
X
-
Tags: None
-
Hello afshinmoshrefi,
Are you trying to find the RGB values of an existing brush?
You could get this by casting the System.Windows.Media.Brush as a System.Windows.Media.SolidColorBrush.
Brush aBrush = Brushes.Honeydew;
SolidColorBrush sBrush = aBrush as SolidColorBrush;
Print(string.Format("{0} | R: {1}, G: {2}, B: {3}, A: {4}", aBrush.ToString(), sBrush.Color.R, sBrush.Color.G, sBrush.Color.B, sBrush.Color.A));
Or are you trying to create a brush using RGB values?
MyBrush = new SolidColorBrush(Color.FromArgb(100, 56, 120, 153));
myBrush.Freeze();
Chelsea B.NinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, Yesterday, 11:51 AM
|
0 responses
17 views
0 likes
|
Last Post
by CarlTrading
Yesterday, 11:51 AM
|
||
|
Started by CarlTrading, Yesterday, 11:48 AM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
Yesterday, 11:48 AM
|
||
|
Started by CaptainJack, 03-25-2026, 09:53 PM
|
0 responses
24 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:53 PM
|
||
|
Started by CaptainJack, 03-25-2026, 09:51 PM
|
0 responses
13 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:51 PM
|
||
|
Started by Mindset, 03-23-2026, 11:13 AM
|
0 responses
20 views
0 likes
|
Last Post
by Mindset
03-23-2026, 11:13 AM
|

Comment