maythamq 0 Newbie Poster

hi guys....
it would be really nice if i get some help because am dying of this

my problem about color in image processing

if i have this value in color image such as 80 , so i want to convert it to R and G and B
so is there any equation for that
also if i have for example R=60 and G=120 and B=180
and i want to convert them to one intensity ...is there any equation for that

by they i know how to convert RGB to HEX and vice versa

thanks