Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Gradient Color
Collapse
X
-
Gradient Color
In Nt7 when I try to use the Color.FromRgb(Convert.ToByte(bValue1),Convert.ToBy te(bValue2),Convert.ToByte(bValue3)) method, the compiler doesn't recognize it. The error message says, "System.Drawing.Color does not contain a definition for 'FromGrb' ". How do I get and set color values using Rgb? I want to use this to create a color gradient. -
Hello,
Thank you for the question.
If this is a copy of the code you are using, the reason would just be a spelling error.
The method is FromArgb but you are using FromRgb.
I look forward to being of further assistance.
-
Hello,
The answer to this was actually already provided in the MSDN link in post #2, on the left you will see the additional Method that Color has, ToArgb is one of those methods.
Otherwise, this is the standard reference which shows the ARGB of each C# color: https://msdn.microsoft.com/en-us/lib...or=-2147217396
Please let me know if I may be of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
152 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
305 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
244 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
345 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
176 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment