Really, this library is just in response to Jeff8500's post:
http://www.byond.com/developer/forum/?id=683508
Anyway, here's the proc you need to know:
colorpicker/proc/getColor(mob/m,rlo,rhi,blo,bhi,glo,ghi)
Parameters:
mob/m - The player choosing a color.
rlo, blo, glo - The lowest r/g/b setting allowed.
rhi, bhi, ghi - The highest r/g/b setting allowed.
Returns: rgb() value chosen by the player.
This proc is similar to input()as color, how it is a visual color selector, but with the ability to restrict players on how much red, green, and/or blue they are allowed to use.
It is a datum proc, so you need to call it like one. This library includes a mob variable, colorpicker, for easy access; just call colorpicker.getColor(). The result is the same as if you wanted to use the rgb() proc.
This library uses its own interface file. The window used for choosing colors is "colorpicker."
You'll need to transfer the window to your game's skin.
To do this:
- Open up Skin.dmf(included in lib), scroll down until you see "window 'colorpicker'". Select all the lines from there to the bottom.
- Open your game's skin, and paste it at the bottom of the file.