Module:Color/doc

From Puella Magi Wiki
Jump to navigation Jump to search

This is the documentation page for Module:Color

A utility module for dealing with colors.

Usage

local color = require('Module:Color')
local p = {}

function p.main(frame)
	local newColor = color.darken(frame.args[1])
	-- Main module code goes here.
end

return p

Darken

Darken the color.

{{#invoke:Color|darken|#ffffff}}

Lighten

Lighten the color.

{{#invoke:Color|lighten|#000000}}

At

Returns color at a given Bootstrap/Tailwind-like brightness level, where 0 is the brightest and 1000 is the darkest.

{{#invoke:Color|at|#ffffff|500}}

Invert

Invert the brightness level.

{{#invoke:Color|invert|#ffffff}}