tf卡是什么卡| 做梦梦到自己拉屎是什么意思| 7月4日是什么星座| 银手镯发黄是什么原因| 金刚钻是什么意思| 妈妈的妈妈叫什么| 吃什么升白细胞最快| 夏天适合种什么水果| 人活一辈子到底为了什么| 铁石心肠是什么意思| 肺炎吃什么药| 土色是什么颜色的图片| oct是什么| 防腐剂是什么| 检查胃应该挂什么科| 唇炎看什么科室| 大肠在人体什么位置图| 12月18号是什么星座| 农历七月二十什么日子| 肚脐眼下面痛什么原因| 一什么无什么| 头晕头痛吃什么药| 王秋儿和王冬儿什么关系| 查艾滋病挂什么科| crocs是什么牌子的鞋| 解脲脲原体阳性是什么意思| anxiety什么意思| 结节有什么症状| 女人为什么会宫外怀孕| 大生化检查都包括什么项目| 嗓子有黄痰是什么原因| 金酒兑什么好喝| 加号是什么意思| 内窥镜是做什么检查| 真实是什么意思| 大姨妈提前是什么原因| 舌头有裂痕是什么原因| 尿隐血弱阳性是什么意思| 闪光点是什么意思| 上头是什么意思| 毛手毛脚什么意思| 无花果叶子有什么功效| 口腔溃疡吃什么药好得快| 跟腱炎什么症状| 女儿是小棉袄儿子是什么| 肝囊肿饮食要注意什么| cco是什么意思| 执迷不悟是什么生肖| 吃皮蛋不能和什么一起吃| mfg是什么意思| 什么东西一吃就死| 义父什么意思| 纨绔子弟是什么意思| 传宗接代是什么意思| 什么什么大叫| 检查免疫力都需要化验什么项目| 肺脓肿是什么病严重吗| hitachi是什么品牌| only是什么品牌| 神经衰弱有什么症状| 毓字五行属什么| 血糖高适合吃什么| 脚肿是什么原因造成的| 一库一库雅蠛蝶是什么意思| 氯读什么拼音| 尿道感染是什么症状| 世风日下什么意思| 7月4日什么星座| 狗尾续貂什么意思| 什么什么若狂| 咽炎吃什么药最管用| 梦见跟妈妈吵架是什么意思| 舌头有黑点是什么原因| 梦见墙倒了有什么预兆| 灰溜溜是什么意思| 湿气是什么意思| 胃穿孔是什么症状| 四大才子是什么生肖| b站的硬币有什么用| 春秋是什么时期| 喝什么茶能减肥| 10.16是什么星座| 思伤脾是什么意思| 背部爱出汗是什么原因| 番茄和西红柿有什么区别| 左肾尿盐结晶是什么意思| 恢复伤口的鱼叫什么鱼| 国士无双什么意思| 夏天木瓜煲什么汤最好| 迎风流泪是什么原因| 今年三十岁属什么生肖| 124什么意思| 大米饭配什么菜最好吃| 欺山莫欺水是什么意思| 苟且是什么意思| 哂是什么意思| 睾丸瘙痒是什么原因| 农历十月份是什么星座| 谪仙是什么意思| 入坑是什么意思| 70大寿有什么讲究| 小结是什么意思| 欧金金什么意思| 英红九号是什么茶| 阿尔茨海默病吃什么药| 激素是什么东西| 偏头疼吃什么药| 扒灰什么意思| 心脏彩超可以检查什么| 翡翠和玉石有什么区别| 孕妇红细胞偏低是什么原因| 口多是什么字| 宝宝病毒性感冒吃什么药效果好| 冬虫夏草有什么用| 吃维生素b6有什么好处和副作用| 刚出生的小鱼苗吃什么| 梦见老公出轨了是什么征兆| 硬下疳长什么样| 囍是什么意思| 肛门下坠吃什么药| 转氨酶高吃什么食物降得快| 心电图窦性心动过缓是什么意思| 天丝是什么材料| 落地生根是什么生肖| 女生右手中指戴戒指什么意思| 脸部肿胀是什么原因| 肌张力高有什么症状| 澳大利亚人说什么语言| 眼睛干涩用什么眼药水| 小排畸是什么检查| 心电图诊断窦性心律什么意思| 中风吃什么药好| 抽血挂什么科| 尖牙什么时候换| 果酸有什么作用| 2006年属什么生肖| 肺部炎症用什么药最好| 菊花有什么颜色| 芝士是什么味道| 苟富贵勿相忘什么意思| 午安是什么意思| 尿酸盐结晶是什么意思| 有血流信号是什么意思| 白细胞偏高说明什么| 卷帘大将是干什么的| 爱出汗吃什么药| 口腔溃疡要吃什么药| kda是什么意思| 副巡视员是什么级别| 每天吃洋葱有什么好处| 身上发抖是什么原因| 经期吃什么| 清热去湿热颗粒有什么功效| 鸭子喜欢吃什么| 百香果有什么营养| 胸痛是什么原因| 摧残是什么意思| 脚底干燥是什么原因| 黄体回声是什么意思| 卫青为什么被灭九族| 香辛料是什么| 什么是黄体破裂| 寒湿吃什么药| 阳盛阴衰是什么意思| 什么是正缘| 女性尿频挂什么科| ny是什么牌子| 怀孕六个月出血是什么原因| 什么叫应届毕业生| 老公护着婆婆说明什么| 热火朝天是什么意思| 益生元和益生菌有什么区别| 脚发麻是什么原因| 6月18是什么日子| 过年为什么要吃饺子| 抑郁症是什么意思| 阿佛洛狄忒是什么神| 为什么胃有灼热感| 女性分泌物像豆腐渣用什么药| 宝宝打嗝是什么原因引起的| 范仲淹是什么朝代的| 为什么会连续两天遗精| 海的尽头是什么| 心包填塞三联征是什么| 黄精是什么药材| 6月份怀孕预产期是什么时候| 睡觉多梦是什么原因引起的| 梦见捡钱了是什么预兆| 男生纹身纹什么好| 阑尾是干什么用的| 肾阴虚有什么症状表现| 正军级是什么级别| 有痔疮不能吃什么食物| 三大产能营养素是什么| 莎莎舞是什么意思| 一个胸大一个胸小是什么原因| 红景天有什么功效| 本科和专科有什么区别| o型血溶血是什么意思| 来事吃什么水果好| 益生菌什么时候吃最好| 肌钙蛋白高是什么原因| 做梦杀人了是什么征兆| 无家可归是什么生肖| 摸不到心跳是什么情况| 中国黄金为什么便宜| 什么人容易得骨髓瘤| 狗为什么喜欢吃骨头| 指甲变黑是什么原因| 支原体感染有什么症状| 八零年属什么生肖| 眼皮发肿是什么原因| 海豚吃什么| 右边脸疼是什么原因| hbv是什么意思| 辟谣是什么意思| 什么的高山填空| peppa是什么意思| 云南白药里面的保险子有什么用| 尿毒症是什么原因导致的| 梦见请客吃饭是什么意思| 天鹅吃什么| 腰疼吃什么药好| 拆封是什么意思| 宝刀未老的意思是什么| 腿容易麻是什么原因| 肺部积水是什么原因引起的| 闪光感是什么感觉| 愧疚是什么意思| 一路顺风是什么生肖| 男生为什么会遗精| 血热是什么原因| 感染科主要看什么病| 甘油三酯高吃什么药能降下来| 奶奶的奶奶叫什么| 大千是什么意思| 印度人信仰什么教| 坐地户是什么意思| 菠萝为什么要用盐水泡| 瑞士用什么货币| TA什么意思| 早孕试纸和验孕棒有什么区别| 腺肌症不治疗会导致什么结果| 1927年属什么生肖| 为什么乳头会痒| 幽门螺旋杆菌阳性吃什么药| s.m什么意思| 小米粥和什么搭配最好最养胃| 骨盆前倾有什么危害| 一个月一个并念什么| 禅悟是什么意思| 囊壁钙化是什么意思| 强直性脊柱炎吃什么药| 康妇炎胶囊主治什么| 脂肪最怕什么| 乌梅是什么水果做的| 桂圆跟龙眼有什么区别| 腰痛是什么原因| 睡眠时间短是什么原因| 例假血是黑色的是什么原因| bso是什么意思| 荨麻疹忌口忌什么食物| 耻骨疼是什么原因| n代表什么| 百度Saltu al enhavo

另类改装 Kahn Design推出路虎卫士Flying Huntsman

El Vikipedio, la libera enciklopedio
Dokumentado Dokumentado

百度 来自中国工程院、同济大学、国家信息中心、国家开发银行、清华大学、全国各地发改委部门、企业界等共约500位代表参加了会议。


?ablona programado Diskutoj Lua Testoj Subpa?oj
Modulo Esperanto English

contrast&namespace=828 Modulo: contrast&namespace=4 Dokumentado


Se vi havas demandon pri ?i tiu Lua-modulo, tiam vi povas demandi en la diskutejo pri Lua-moduloj. La Intervikiaj ligiloj estu metataj al Vikidatumoj. (Vidu Helpopa?on pri tio.)
--
-- This module implements
--  {{Color contrast ratio}}
--  {{Greater color contrast ratio}}
--  {{ColorToLum}}
--  {{RGBColorToLum}}
--
local p = {}
local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' )

local function sRGB (v)
	if (v <= 0.03928) then
		v = v / 12.92
	else
		v = math.pow((v+0.055)/1.055, 2.4)
	end
	return v
end

local function rgbdec2lum(R, G, B)
	if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then
		return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255)
	else
		return ''
	end
end

local function hsl2lum(h, s, l)
	if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then
		local c = (1 - math.abs(2*l - 1))*s
		local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) )
		local m = l - c/2

		local r, g, b = m, m, m
		if( 0 <= h and h < 60 ) then
			r = r + c
			g = g + x
		elseif( 60 <= h and h < 120 ) then
			r = r + x
			g = g + c
		elseif( 120 <= h and h < 180 ) then
			g = g + c
			b = b + x
		elseif( 180 <= h and h < 240 ) then
			g = g + x
			b = b + c
		elseif( 240 <= h and h < 300 ) then
			r = r + x
			b = b + c
		elseif( 300 <= h and h < 360 ) then
			r = r + c
			b = b + x
		end
		return rgbdec2lum(255*r, 255*g, 255*b)
	else
		return ''
	end
end

local function color2lum(c)

	if (c == nil) then
		return ''
	end

	-- html '#' entity
	c = c:gsub("&#35;", "#")

	-- whitespace
	c = c:match( '^%s*(.-)[%s;]*$' )

	-- unstrip nowiki strip markers
	c = mw.text.unstripNoWiki(c)

	-- lowercase
	c = c:lower()

	-- first try to look it up
	local L = HTMLcolor[c]
	if (L ~= nil) then
		return L
	end

	-- convert from hsl
	if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then
		local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$')
		return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100)
	end

	-- convert from rgb
	if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then
		local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$')
		return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B))
	end

	-- convert from rgb percent
	if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then
		local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$')
		return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100)
	end

	-- remove leading # (if there is one) and whitespace
	c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$')

	-- split into rgb
	local cs = mw.text.split(c or '', '')
	if( #cs == 6 ) then
		local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2])
		local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4])
		local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6])

		return rgbdec2lum(R, G, B)
	elseif ( #cs == 3 ) then
		local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1])
		local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2])
		local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3])

		return rgbdec2lum(R, G, B)
	end

	-- failure, return blank
	return ''
end

-- This exports the function for use in other modules.
-- The colour is passed as a string.
function p._lum(color)
	return color2lum(color)
end

function p._greatercontrast(args)
	local bias = tonumber(args['bias'] or '0') or 0
	local css = (args['css'] and args['css'] ~= '') and true or false
	local v1 = color2lum(args[1] or '')
	local c2 = args[2] or '#FFFFFF'
	local v2 = color2lum(c2)
	local c3 = args[3] or '#000000'
	local v3 = color2lum(c3)
	local ratio1 = -1;
	local ratio2 = -1;
	if (type(v1) == 'number' and type(v2) == 'number') then
		ratio1 = (v2 + 0.05)/(v1 + 0.05)
		ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1
	end
	if (type(v1) == 'number' and type(v3) == 'number') then
		ratio2 = (v3 + 0.05)/(v1 + 0.05)
		ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2
	end

	if css then
		local c1 = args[1] or ''
		if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or
			mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then
				c1 = '#' .. c1
		end
		if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or
			mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then
				c2 = '#' .. c2
		end
		if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or
			mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then
				c3 = '#' .. c3
		end
		return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';'
	end

	return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or ''
end

function p._ratio(args)
	local v1 = color2lum(args[1])
	local v2 = color2lum(args[2])
	if (type(v1) == 'number' and type(v2) == 'number') then
		-- v1 should be the brighter of the two.
		if v2 > v1 then
			v1, v2 = v2, v1
		end
		return (v1 + 0.05)/(v2 + 0.05)
	else
		return args['error'] or '?'
	end
end

function p._styleratio(args)
	local style = (args[1] or ''):lower()
	local bg, fg = 'white', 'black'
	local lum_bg, lum_fg = 1, 0

	if args[2] then
		local lum = color2lum(args[2])
		if lum ~= '' then bg, lum_bg = args[2], lum end
	end
	if args[3] then
		local lum = color2lum(args[3])
		if lum ~= '' then fg, lum_fg = args[3], lum end
	end

	local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';')
	for k = 1,#slist do
		local s = slist[k]
		local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' )
		k = k or ''
		v = v or ''
		if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then
			local lum = color2lum(v)
			if( lum ~= '' ) then bg, lum_bg = v, lum end
		elseif (k:match('^[%s]*(color)[%s]*$')) then
			local lum = color2lum(v)
			if( lum ~= '' ) then bg, lum_fg = v, lum end
		end
	end
	if lum_bg > lum_fg then
		return (lum_bg + 0.05)/(lum_fg + 0.05)
	else
		return (lum_fg + 0.05)/(lum_bg + 0.05)
	end
end

--[[
Use {{#invoke:Color contrast|somecolor}} directly or
{{#invoke:Color contrast}} from a wrapper template.

Parameters:
	-- |1=	— required; A color to check.
--]]
function p.lum(frame)
	local color = frame.args[1] or frame:getParent().args[1]
	return p._lum(color)
end

function p.ratio(frame)
	local args = frame.args[1] and frame.args or frame:getParent().args
	return p._ratio(args)
end

function p.styleratio(frame)
	local args = frame.args[1] and frame.args or frame:getParent().args
	return p._styleratio(args)
end

function p.greatercontrast(frame)
	local args = frame.args[1] and frame.args or frame:getParent().args
	return p._greatercontrast(args)
end

return p
ifashion是什么意思 一般什么时候排卵 女性掉发严重是什么原因 model是什么牌子 罗姓男孩取什么名字好
原始分是什么意思 急性胃肠炎用什么药 丹参粉有什么作用和功效 霸王别姬是什么菜 梦见猫吃老鼠什么意思
内秀是什么性格的人 拔罐拔出水泡是什么原因 肌酐低有什么危害 肺部积水是什么原因引起的 5.11什么星座
槟榔是什么味道 甲状腺结节伴钙化什么意思 榴莲为什么那么臭 脸上长水泡似的痘痘是什么原因 手掌红什么原因
冬练三九夏练三伏是什么意思qingzhougame.com 九朵玫瑰花代表什么意思hcv7jop9ns6r.cn 鞘膜积液挂什么科bfb118.com 杜鹃花什么颜色hcv9jop6ns9r.cn 媛是什么意思hcv8jop2ns3r.cn
豆豉炒什么菜好吃weuuu.com 受精卵着床有什么感觉hcv9jop7ns1r.cn 等不到天黑烟火不会太完美什么歌hcv8jop3ns0r.cn 阳虚吃什么中成药hcv9jop4ns9r.cn 粉墙用什么hcv8jop5ns5r.cn
肠易激综合症吃什么药hcv9jop0ns2r.cn 国家为什么重视合肥hcv9jop7ns2r.cn 总蛋白偏低是什么意思hcv9jop4ns1r.cn 开封有什么大学hcv9jop8ns0r.cn 鼻子老流鼻涕是什么原因引起1949doufunao.com
皮肤擦伤用什么药最好hcv9jop2ns3r.cn 无私是什么意思hcv8jop5ns4r.cn 庚午日是什么意思hcv8jop0ns0r.cn 前庭大腺囊肿是什么原因引起的hcv8jop1ns4r.cn 减肥什么方法最快最有效hcv8jop9ns7r.cn
百度