View source for Module:Value color

MyWikiBiz, Author Your Legacy — Wednesday June 04, 2025
Jump to navigationJump to search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in one of the groups: Users, vuser.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

local getArgs = require('Module:Arguments').getArgs
local p = {}
local function rgb(color)
local _, _, R, G, B = color:find('(%w%w)(%w%w)(%w%w)')
return tonumber(R, 16), tonumber(G, 16), tonumber(B, 16)
end
function p.main(frame)
local args = getArgs(frame)
local value = tonumber(args[1])
local minValue = tonumber(args[2])
local maxValue = tonumber(args[3])
if value == nil or minValue == nil or maxValue == nil then
return require('Module:Error').error{'Parameters 1, 2, and 3 are required and must be numbers.'}
end
local minR, minG, minB = rgb(args[4] or 'FFFFFF')
local maxR, maxG, maxB = rgb(args[5] or '000000')
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Template used on this page:

Return to Module:Value color.