Colour Brightness Experiment
Colour Brightness Values

Colour Brightness Levels : Greyscale
native
gamma sRGB
roughnready
squared linear
unweighted
exponent
brightness weighted set custom likePhotoshop
0 0 set custom RoughnReady
0 0 set custom XYZ
0 0 set custom YIQ
0 0 Lightness
0 0 Average
0 0 custom
exponent sum factors to 1
factors: R G B
0 0 
Native  Native means gamma sRGB for likePhotoshop, roughnready for RoughnReady, and linear for all the rest. Note that the unbrightnessweighted formulas all display linearly on the graph. Linear here referes to a formula that isn't raised by any exponents along the way. 
Gamma sRGB  The gamma sRGB formula is a greyscale produced from a formula involving both inverse gamma and gamma sRGB. This is described on Formulas for Calculating Colour Brightness. 
roughnready  My formula for giving an approximation to the gamma sRGB formula with a single line of code: brightness_value = (red_factor*R^exponent + green_factor*G^exponent + blue_factor*B^exponent)^(1/exponent) where R, G and B are the values for Red, Green and Blue. See also Formulas for Calculating Colour Brightness 
squared  Square root using sqrt((red_factor*(R^2)) + (green_factor*(G^2)) + blue_factor*(B^2)) where R, G and B are the values for Red, Green and Blue. 
linear  red_factor*R + green_factor*G + blue_factor*B where R, G and B are the values for Red, Green and Blue. This is the basic calculation often recommended for calculating brightnesss of a colour but is weak in its consistency. 
unweighted  The formulas as calculated. 
brightness weighted  The calculated greyscale value from the chosen formula is then converted to inverse gamma sRGB. This weights the brightness more high the higher the brightness value and gives a curved graph. Because relative brightnesses are greater the higher the brightness value this result is practical for identifying in perceptual terms how much brighter one value is than another and has practical use in determining text readability. This is described on Formulas for Calculating Colour Brightness. 
likePhotoshop  red_factor 0.2235, green_factor 0.7154, blue_factor 0.0611, exponent 2.4. See Formulas for Calculating Colour Brightness. Note this will only set a value that is abolutely like Photoshop when the calculation type is set to Gamma sRGB. 
RoughnReady  red_factor 0.22475, green_factor 0.7154, blue_factor 0.5575, exponent 2.234. See Formulas for Calculating Colour Brightness. 
XYZ  CIE XYZ coefficients of red_factor 0.2125, green_factor 0.7154, blue_factor 0.0721, (exponent 2.4 as for gamma sRGB). 
YIQ  YIQ coefficients also known as Digital CCIR601 and suggested in the Web Accessibility Guidelines from the W3C and challenged by me (see Holes in the W3C Colour Readability Guidelines. ) coefficients of red_factor 0.299, green_factor 0.5870, blue_factor 0.114, (exponent 2.4 as for gamma sRGB). 
Lgt  Lightness: ½ × (max(R,G,B) + min(R,G,B)), see Puzzling Greys. 
Avg  Average:(R + G + B) ÷ 3, see Puzzling Greys. 
Custom  You can try out your own permutations. 
Fractions  To calculate the next brightness level the code goes up or down in one hundredths of a brightness level for each of the red, green and blue elements one by one. This gives an accurate value for each of the 255 levels. 
+1  To calculate the next brightness level the code goes up or down by 1 for each brightness level for each of the red, green and blue elements one by one. This method is quicker than incrementing by fractions and may not give so accurate a result, though often the difference is undiscernable. 
Redistribute Excess  When, in calculating the next brightness level by adding to the previous brightness level, one of the triad is greater than 255, its excess over 255 is redistributed to the other two elements of the triad, see StackOverflow for the formula for how to do this. 
Clamp  When, in calculating the next brightness level by adding to the previous brightness level, one of the triad is greater than 255, it is clamped at 255 see StackOverflow for the formula for how to do this. For certain hues this changes the hue slightly in the upper brightness ranges. 