You simply need to change the Color spaces of the image. Just make sure you put the correct ranges for each component. An Example with Lab is below. The a,b have ranges in -127 to 127 and hence am subtracting 127.
import cv2
import numpy as np
def nothing(x):
pass
img = np.zeros((300,512,3), np.uint8)
cv2.namedWindow('image')
cv2.createTrackbar('L','image',0,100,nothing)
cv2.createTrackbar('A','image',0,255,nothing)
cv2.createTrackbar('B','image',0,255,nothing)
while(1):
cv2.imshow('image',img)
k = cv2.waitKey(1) & 0xFF
if k == 27:
break
img= cv2.cvtColor(img, cv2.COLOR_BGR2LAB)
l = cv2.getTrackbarPos('L','image')
a = cv2.getTrackbarPos('A','image')-127
b = cv2.getTrackbarPos('B','image')-127
img[:] = [l,a,b]
cv2.destroyAllWindows()