setRestrictToAvailableColors

abstract fun setRestrictToAvailableColors(restrictToAvailableColors: Boolean): T

Sets whether the user is restricted to the available colors.

When true, the color picker offers only the available colors — no custom color entry, no recently used colors, and no generated color variations. Defaults to false.

Parameters

restrictToAvailableColors

true to allow only the available colors, false to also offer custom entry, recents, and variations.