Pngex.set_palette

You're seeing just the function set_palette, go back to Pngex module for more information.
Link to this function

set_palette(pngex, palette)

Specs

set_palette(t(), [rgb_color()]) :: t() | {:error, [{:invalid_palette, any()}]}

Sets a palette.

Examples

iex> Pngex.new() |> Pngex.set_palette([{0, 0, 0}, {255, 0, 0}, {0, 255, 0}, {0, 0, 255}])
%Pngex{palette: [{0, 0, 0}, {255, 0, 0}, {0, 255, 0}, {0, 0, 255}]}
iex> Pngex.new() |> Pngex.set_palette([0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255])
{:error, invalid_palette: [0, 0, 0, 255, 0, 0, 0, 255, 0, 0, 0, 255]}