Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BRUSHES -> RGB specific example

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BRUSHES -> RGB specific example

    Hello. I have a specific code example which I need to change. It uses the color "LightSkyBlue" and I need to change that into a specific RGB code. What I need is the code not an explanation, because I am not a good programmer.

    Here is the original code:

    RenderTarget.FillRectangle(new RectangleF(x,y, (float)(chartControl.BarWidth * 2), (float)(rectangleOffset)), Brushes.LightSkyBlue.ToDxBrush(RenderTarget));


    The goal is to change LightSkyBlue into RGB(100,50,245)

    Hope somebody can help.

    #2
    Hello CYDFSN23,

    Thanks for opening the thread and welcome to our support forums!

    What you are attempting to do is replace a predefined SolidColorBrush with your own custom SolidColorBrush.

    You could create your own custom SolidColorBrush and use that instead of Brushes.LightSkyBlue.

    Here is an example:

    Code:
    Brush myBrush = new SolidColorBrush(Color.FromRgb(100, 50, 245));
    Please let me know if you have any additional questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    29 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    17 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    9 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    15 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    18 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X