Ejnar Hertzsprung in 1911 and Henry Norris Russell in 1913 mapped absolute magnitude of stars against their colour.
Our Sun "Sol" is along a region called the Main Sequence.
The Bluer the Start is the hotter.