It is shown that if a demand function with no inferior goods satisfies the Slutsky conditions and has a convex range, then it is generated by a continuous utility function. The same conclusion holds when the Slutsky conditions are replaced by the strong axiom of revealed preference.