We present a study of the relation between dark matter halo mass and the baryonic content of their host galaxies , quantified through galaxy luminosity and stellar mass . Our investigation uses 154 \mathrm { deg } ^ { 2 } of Canada-France-Hawaii Telescope Lensing Survey ( CFHTLenS ) lensing and photometric data , obtained from the CFHT Legacy Survey . To interpret the weak lensing signal around our galaxies we employ a galaxy-galaxy lensing halo model which allows us to constrain the halo mass and the satellite fraction . Our analysis is limited to lenses at redshifts between 0.2 and 0.4 , split into a red and a blue sample . We express the relationship between dark matter halo mass and baryonic observable as a power law with pivot points of 10 ^ { 11 } h _ { 70 } ^ { -2 } L _ { \odot } and 2 \times 10 ^ { 11 } h _ { 70 } ^ { -2 } M _ { \odot } for luminosity and stellar mass respectively . For the luminosity-halo mass relation we find a slope of 1.32 \pm 0.06 and a normalisation of 1.19 ^ { +0.06 } _ { -0.07 } \times 10 ^ { 13 } h _ { 70 } ^ { -1 } M _ { \odot } for red galaxies , while for blue galaxies the best-fit slope is 1.09 ^ { +0.20 } _ { -0.13 } and the normalisation is 0.18 ^ { +0.04 } _ { -0.05 } \times 10 ^ { 13 } h _ { 70 } ^ { -1 } M _ { \odot } . Similarly , we find a best-fit slope of 1.36 ^ { +0.06 } _ { -0.07 } and a normalisation of 1.43 ^ { +0.11 } _ { -0.08 } \times 10 ^ { 13 } h _ { 70 } ^ { -1 } M _ { \odot } for the stellar mass-halo mass relation of red galaxies , while for blue galaxies the corresponding values are 0.98 ^ { +0.08 } _ { -0.07 } and 0.84 ^ { +0.20 } _ { -0.16 } \times 10 ^ { 13 } h _ { 70 } ^ { -1 } M _ { \odot } . All numbers convey the 68 % confidence limit . For red lenses , the fraction which are satellites inside a larger halo tends to decrease with luminosity and stellar mass , with the sample being nearly all satellites for a stellar mass of 2 \times 10 ^ { 9 } h _ { 70 } ^ { -2 } M _ { \odot } . The satellite fractions are generally close to zero for blue lenses , irrespective of luminosity or stellar mass . This , together with the shallower relation between halo mass and baryonic tracer , is a direct confirmation from galaxy-galaxy lensing that blue galaxies reside in less clustered environments than red galaxies . We also find that the halo model , while matching the lensing signal around red lenses well , is prone to over-predicting the large-scale signal for faint and less massive blue lenses . This could be a further indication that these galaxies tend to be more isolated than assumed .