calculate darkness value of an image
convert original.jpeg -colorspace hsb -resize 1x1 txt:-
# ImageMagick pixel enumeration: 1,1,255,hsb
0,0: ( 61, 62,134) #3D3E86 hsb(24.1138%,24.1764%,52.4941%)
#The 'brightness' values you see here (either of 134, #86 or 52.4941%) is probably what you want to know.