Skip to main content

system.kanoa.utilities.getNextColor(usedColors)

Given a list of hex color strings, returns a new hex color whose hue is maximally distant from all used hues. Introduced in v1.15.0.


Parameters

usedColors List of Strings: List of hex color strings already used


Returns

newHexColor String


Example

lotOperations = system.kanoa.utilities.convertDatasetToJSON(system.kanoa.lot.getLotOperations({}))
usedColorList = [lotOperation['lotOperationColor'] for lotOperation in lotOperations]
newlotOperationColor = getNextColor(usedColorList)