RGB is a bad format to manipulate colors. You can convert RGB to HSV where you have the Hue, which describes the color, Saturation which describes how colorful it is and Value which controls brightness.
For example Hue value 0 is red, with saturation 255 and value 255 you get a bright red. With saturation at 90 and value at 255 you get a Pink, while with value at 90 but saturation at 255 you get a dark bloody red
So for example you get a color in rgb, you convert it to HSV. Then you check if the Value is smaller than 128, then its a dark color. If you brighten it up, just increase that value. Similarly you can check using the saturation if it's more gray leaning or more colorful.
Especially if you want to generate a color scheme you can let the user pick a color (the hue value) and then generate a dark, a bright, a dim and a colorful version of it by tinkering the saturation and value