chickadee » sdl2 » make-color

make-color #!optional r g b aprocedure
make-colour #!optional r g b aprocedure
make-color* #!optional r g b aprocedure
make-colour* #!optional r g b aprocedure

Allocate and initialize a new sdl2:color.

r, g, b, and a must be integers in the range 0 to 255 (inclusive). r, g, and b default to 0. a defaults to 255 (full opacity).

  • make-color and make-colour return a managed sdl2:color.
  • make-color* and make-colour* return an unmanaged sdl2:color, which must be freed using free-color! when you are done with it.