i want to find the dominant color in image, how can i do it ?
it would be great if i can get this in HEX code (exm: #eeeeee)
You should have a look at GD and Image Functions.
There is a similar question on SO about extracting color information from an image with PHP, and it links to this class on github.