Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Does anyone know of a way to calculate a lighter/darker version of a colour selection returned from the colour picker control?

 

So if a user picked a shade of blue which would be the new colour of the form, then I want to set all the controls backcolor property to a different shade of the chosen colour.:)

My website
Posted

If you are using Visual studio .net, you can choose colors by supplying the RGB (Red,Green,Blue) color scheme.

 

Red is 255,0,0

Green is 0,255,0

Blue is 0,0,255

Yellow is 255,255,0

Black is 0,0,0

White is 255,255,255

 

What you can do is when a user selects one of those colors change one of the three numbers by some range you choose.

 

If you have Adobe Photoshop you can try the colors and see their RGB values.

 

Hope this helps....

Dream as if you'll live forever, live as if you'll die today
Posted

Thnx....

 

This is how I have done it:

 


Me.ColorDialog1.ShowDialog()

clrColour = Me.ColorDialog1.Color

Dim mColour As Color = Color.FromArgb(150, Me.ColorDialog1.Color)

Me.picBackground.BackColor = mColour

My website
Posted

OK thnx.

 

What I am finding though is that when the code that changes the form backcolor and all the controls backcolor values I get a lot of flicker, but if I leave the controls alone no flicker occurs?

My website

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...