Implement hsl/rgb conversion functions