The standard way to highlight an item is to use the system highlight color.
You can access that using the SystemColors.Highlight
property, which returns a Color
structure corresponding to the background color that the operating system uses for selected items.
The major benefit of doing it this way is that the user immediately recognizes the object as highlighted. Choosing an arbitrary color won't necessarily mean what you intend for it to mean. Being consistent with all of the other programs on their computer will go a long way towards enhancing the usability and user experience of your software.
EDIT: If you really insist on using a lightened version of the original color as the highlight color, the best way to calculate that is to convert the starting color into an alternative color space, like HSV. The RGB space was not really designed for color manipulation, and lightening a color's 3 RGB component values won't always produce the color that you expect. I provide sample code here for this conversion.
Once you've converted the color to the HSV color space, simply increase its V
(or "value") attribute to lighten it, then convert it back to an RGB color. There is a built-in method to create a Color
structure from RGB component values: Color.FromArgb
Note that the HSV color space is also known as HSB (where "value" is changed to "brightness"). They're perfectly equivalent in every way. That is not the same color space, however, as HSL, where L
stands for "lightness". The Wikipedia article provides more information for the curious.