# Using Maximize with LABColor

I'm writing a function that, given a color, returns a contrasting color. It does this by maximizing the ColorDistance between the input and output colors. However, I'm getting an error that's complaining about how LABColor[l, a, b] is symbolic and not a color, which it is until Maximize gives it numerical value (and ultimately does find a nominally contrasting color). What do I do to LABColor to stop this error?

(Note that I don't think this scheme for finding contrasting colors is particularly good, I just want to know how to fix this error for general knowledge)

(* bounds of RGB space in LAB space *)
rgbCube = Cuboid[{0, -0.8, -1.13}, {1, 0.94, 0.94}];

(* Find a highly contrasting color *)
Maximize[
ColorDistance[Pink, LABColor[l, a, b]], {l, a, b} \[Element]
rgbCube]

ColorDistance: Pink and LABColor[l, a, b] should be two valid color directives, images, or lists of objects with the same dimension.

Out[1]= {2.00573, {l -> 0., a -> -0.8, b -> -1.13}}


rgbCube = Cuboid[{0, -0.8, -1.13}, {1, 0.94, 0.94}];