diff --git a/doc/api.md b/doc/api.md index c920744..b44a0ea 100644 --- a/doc/api.md +++ b/doc/api.md @@ -96,6 +96,22 @@ Returns true if images are set to be horizontally flipped when drawn Set whether images should be horizontally flipped when draw. If `enable` is not passed then this is set to false by default. +##### love.graphics.getPalette([index]) +Returns 3 numerical values between 0 and 256 representing the rgb color at the +given palette `index`. If no `index` is given then a table with a length of 768 +consisting of the value of each channel for each color of the current palette +is returned. This table can be used with `love.graphics.setPalette()`. + +##### love.graphics.setPalette(index, r, g, b) +Sets the palette's color at the `index` palette to the rgb color value. `r`, +`g` and `b` should each be a value between 0 and 256. + +##### love.graphics.setPalette(t) +Sets the entire palette from the provided table `t`. The table should consist +of 768 numerical values, one for each channel of each rgb color of the palette. +For example, the first number in the table would correspond to the red channel +of the color 0. Each value should be between 0 and 256. + ##### love.graphics.reset() Resets the font, color, background color, canvas, blend mode and flip mode to their defaults.