Question: I heard that simple

```
R*=f;
G*=f;
B*=f;

```

where f is a scalar value 0 .. 1.0 or more 
Is not to much proper way of changing brightnes 
of the color, but i cannot find some code snippet
to obtain something better (without to much studying 
of a color theory)
Could maybe someone give me such snipped here? TNX

Answer: 
Convert the colour to HSL or HSV, then adjust the lightness (L) or value (V). If needed, convert back to RGB.
Because 0,0,0 is black and 255,255,255 is white, (with a grayscale inbetween) your formula is indeed a very good approximation for changing the *brightness* of a given color value.

It is not *exact* in terms of *perceived* brightness but works well enough for most applications.

A simple conversion from RGB to Lightness is:

```
L = 1/3 * (R+G+B)

```

As you may see from this formula, f\*L and your approach are identical.