\subsection{The \emph{luadraw\_palettes} Module}

The \cmd{luadraw\_palettes} Module\footnote{This module is a contribution of \href{https://github.com/projetmbc/for-writing/tree/main/@prism}{Christphe BAL}.} defines $261$ color palettes, each with a name. A palette is a list (table) of colors, which are themselves lists of three numerical values ​​between $0$ and $1$ (red, green, and blue components). The list of these palettes, as well as their rendering, can be viewed in this \href{luadraw_palettes_list.pdf}{document}.

\textbf{This module does not add any new graphics methods, but it returns a table of color definitions}, plus the function \cmd{getPal(palname, options)}. Therefore, it is used as follows (example):

\begin{Luacode}
local pal = require 'luadraw_palettes'
local color = pal.Blackbody
local BlackbodyTransformed = pal.getPal( -- returns a new palette
    color, -- a palette name
    {
    extract = {2, 5, 8, 9}, -- color numbers to extract
    shift = 1, -- offset among the extracted colors, which gives here: 5,8,9,2
    reverse = true -- reversing the order, which gives here: 2,9,8,5
    }
)
\end{Luacode}
