Why does hsl(239, 84%, 67%) give a slightly different hex?
Because rounding moved it. #6366f1 is hsl(238.7, 83.5%, 66.7%); rounded to whole numbers it becomes #6467f2, one step off in every channel. Rounded that way, nine colours in ten change and over a third move two steps or more; kept to one decimal, none of the 16,777,216 does.
Is HSL the same as HSB or HSV?
No. They share the hue and nothing else: #6366f1 has 83.5% saturation in HSL and 58.9% in HSB, and 66.7% lightness against 94.5% brightness. Design programs such as Photoshop show HSB and CSS takes HSL, so numbers copied from one to the other change the colour.
Why do two colours with 50% lightness look so different?
HSL’s lightness is arithmetic on red, green and blue, not what the eye sees: pure yellow, hsl(60, 100%, 50%), and pure blue, hsl(240, 100%, 50%), share it. Their OKLCH lightness is 96.8% and 45.2%.
How is hex turned into HSL by hand?
Read each channel as a fraction of 255. Lightness is the mean of the largest and smallest, saturation their difference divided by 1 − |2L − 1|, and the hue says which channel leads. For #336699 the largest is 0.6 and the smallest 0.2: lightness 40%, saturation 50%.