Controls

icon picker
Color

1. Never Use Slider Control or Angle Control to Change Colors

Sometimes you may want to allow the user to change only the hue, saturation or brightness of a color and not all three at once.
When this is the case, you should still use a Color Control since it’s more intuitive for users to pick from a color picker, rather than a or .
You can use expressions to modify the hue, saturation or brightness, as shown in the code example below.
Alternatively, you can use the Hue Color script from or .

// Convert RGB to HSL
let hsl = rgbToHsl(inputColor);

// Example: Set HUE to 30 degrees
hsl[0] = 30;

// Example: Lower saturation for 50%
hsl[1] *= 0.5;

// Example: Increase brightness for 100%
hsl[2] *= 2;

// Convert back to RGB
let rgb = hslToRgb(hsl);
Screenshots
AfterFX_VTU9KgkAub.gif

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.