自身免疫性疾病是什么意思| 灰色配什么色好看| 为什么总是头晕| 胆红素升高是什么原因| 内窗是什么意思| 沉甸甸的爱是什么意思| 激动是什么意思| 甘油三酯高用什么药好| 血管是什么组织| 正装是什么样的衣服| 轮廓是什么意思| 什么是血脂| 道家思想的核心是什么| 胃不好不能吃什么| 手刃是什么意思| 求婚什么意思| c2驾驶证能开什么车| 晟是什么字| 吃苦瓜对身体有什么好处| 肝内脂肪浸润是什么意思| 64岁属什么生肖| mra是什么牌子| 多此一举是什么意思| 男女接吻有什么好处| 浇花的水壶叫什么| 勉铃是什么| 3.5是什么星座| edd是什么意思| 梦见玉米是什么意思| 泡沫尿吃什么药| 骨质增生是什么| 悲伤是什么意思| 女性睾酮低意味着什么| 脑白质变性什么意思| 2017年是什么命| 嘴唇上长水泡是什么原因| 木耳菜不能和什么一起吃| 指甲上白色月牙代表什么| bs是什么意思| 怀孕脸上长痘痘是什么原因| 汝等是什么意思| 莫吉托是什么| 家里出现蛇是什么征兆| 狗有眼屎是什么原因| 夜间盗汗是什么原因| 韭黄是什么| 七宗罪分别是什么| 胎教什么时候开始最好| hpv58阳性是什么意思| bally属于什么档次| 无精是什么原因造成的| 什么运动能长高| 紫菜和海苔有什么区别| 猫来家门口有什么预兆| 射进去什么感觉| 牛宝是什么| 梦到分手了是什么征兆| 11月20号什么星座| 过氧化氢阳性什么意思| 什么是因果| 杏干泡水喝有什么功效| 咳嗽发烧是什么原因| 理工男是什么意思啊| 为什么玉镯不能戴左手| 什么样的葡萄| 皮质醇是什么意思| 孕妇手麻是什么原因引起的| 盖世英雄是什么意思| 翼龙吃什么| 6月13日是什么星座| 什么的脸庞| 昔字五行属什么| 血热是什么症状| 什么是腺样体面容| 谷草谷丙偏高是什么意思| 黄鼠狼怕什么| 绿色痰液是什么感染| 发烧适合吃什么水果| 腿长身子短有什么说法| 多巴胺什么意思| 十月十一是什么星座| 世界七大奇迹分别是什么| ev71是什么疫苗| 自身免疫性肝病是什么意思| 什么风什么什么| 酒糟鼻子是什么原因引起的| 出离心是什么意思| canyou是什么意思| 小狗起什么名字好听| 对牛弹琴是什么意思| bayer是什么药| 什么样的人不能吃海参| 事后紧急避孕药什么时候吃有效| brat什么意思| 尿蛋白质弱阳性是什么意思| 小资情调是什么意思| 吃什么可以让卵泡长得快| 军级相当于什么级别| 子宫多发肌瘤是什么意思| 为什么会宫寒| 5.19是什么星座| 赵本山是什么学历| 脸上长藓用什么药| 鲜牛奶和纯牛奶有什么区别| 为什么一喝酒就头疼| 芒果是什么意思| 老人脚浮肿是什么原因引起的| 岁月不饶人是什么意思| 广西属于什么地区| 为什么会感染幽门螺杆菌| 晚上睡觉流口水是什么病| 尿常规能查出什么病| 什么病不能吃核桃| 花甲炒什么配菜好吃| rush是什么东西| 人生苦短是什么意思| 眼睛干涩模糊用什么药| 广州番禺有什么好玩的地方| 运动后出汗多是什么原因| 看望病人买什么东西好| 庶母是什么意思| 女人下嘴唇厚代表什么| 李小龙是什么生肖| 画地为牢是什么意思| 左肺上叶钙化灶什么意思| 哈尔滨有什么特产| 八月17号是什么星座的| 农历六月初六是什么节| 全科门诊主要看什么| 脚趾头发麻什么原因| 什么的尾巴有什么作用| 宝宝细菌感染吃什么药| 举案齐眉什么意思| 仙居杨梅什么时候上市| 腹泻期间宜吃什么食物| 血管检查什么方法最好| 维生素D有什么食物| 常委是什么级别| 因果报应是什么意思| 冬至有什么禁忌| 晚生是什么意思| 血脂高不能吃什么| 吃猪皮有什么好处和坏处| 狗子是什么意思| 肠胃痉挛吃什么药| 脑白质脱髓鞘吃什么药| 秉承是什么意思| 惊悉是什么意思| 跛子是什么意思| 动脉硬化吃什么药最好| 平肝什么意思| 咆哮是什么意思| 网店卖什么好| 什么的荷叶| size什么意思| 太平猴魁是什么茶| 老是犯困是什么原因| 芦荟有什么好处| 卡路里什么意思| 米为什么会生虫| 女人养颜抗衰老吃什么最好| 胎方位loa是什么意思| 没有什么| 头皮发麻是什么病的前兆| 什么样的浪花| 确立是什么意思| 暴跳如雷是什么意思| 老子是什么时期的人| tips什么意思| 脑蛋白治疗什么病| 亮晶晶的什么填空| 5月24号是什么日子| 作灶是什么意思| 婕妤是什么意思| 什么都值得买| 屏幕总成带框和不带框有什么区别| 嘴唇有黑斑是什么病| 大麦和小麦有什么区别| 肾上腺增生是什么意思| 婶婶是什么意思| 生命是什么意思| 拉肚子是什么原因引起的怎么办| 黄鼠狼的天敌是什么动物| 血糖高去医院挂什么科| 扒灰什么意思| 情系是什么意思| 401什么意思| 孕妇缺铁对胎儿有什么影响| od值是什么| 减肥吃什么瘦的快| 兔子尾巴像什么| 外出是什么意思| 谷草转氨酶偏低是什么意思| pt是什么时间| 山楂有什么功效| 荔枝可以做什么| 异什么意思| marlboro是什么烟| 大便粘马桶是什么原因| nautical什么牌子| 子宫癌筛查做什么检查| 时辰宜忌是什么意思| 核医学科主要治什么病| 本心是什么意思| 暖皮适合什么颜色衣服| 桂林山水甲天下是什么意思| 福州五行属什么| 情人节送什么礼物好| 一五行属性是什么| 为什么会得脑血栓| 有一种水果叫什么竹| 哺乳期胃疼可以吃什么药| 9月18日是什么日子| 每天吃一个西红柿有什么好处| 恐惧是什么意思| opec是什么意思| 眼球内容物包括什么| 此起彼伏是什么意思| 属鸡的是什么命| 土龙是什么| 马齿苋吃了有什么好处| 小鸟喜欢吃什么食物| 今年农历是什么年号| 床上出现蜈蚣什么原因| 晚上睡觉口苦是什么原因| 飞蚊症滴什么眼药水| 酵母菌属于什么菌| 火旺是什么意思| cac是什么意思| 艾灸治什么病| 喝柠檬水有什么作用与功效| 紫水晶属于五行属什么| 铜钱草能治什么病| 大姨妈一个月来两次是什么原因| 椰浆和椰汁有什么区别| 脘痞什么意思| 宝宝什么时候开始长牙| 嘴唇上火起泡是什么原因| 喝什么茶养胃| 灵芝孢子粉治什么病| 打嗝和嗳气有什么区别| 吃羊肉不能吃什么东西| 腿没有劲是什么原因| 双鱼座和什么座最配| 瞌睡多什么原因| 7.12是什么星座| 孕妇梦见老鼠是什么意思| 做梦吃屎有什么预兆| 待我长发及腰时下一句是什么| 什么牌子的蓝牙耳机好| 复方氨酚苯海拉明片是什么药| 舌头起泡吃什么药好| 医院建档是什么意思| 性格开朗是什么意思| 嘴唇有黑斑是什么原因| 11.7号是什么星座| 拉抽屉是什么现象| 高血压挂什么科室| 都有什么菜好吃| 7月15什么星座| 学海无涯苦作舟的上一句是什么| 心跳过缓是什么原因造成的| 什么季节掉头发最厉害| 阿迪达斯是什么牌子| 百度Edukira joan

新区“十三五”水务发展规划

Wikipedia, Entziklopedia askea
百度 对于工作职责,经济顾问要“两手抓”。

Documentation for this module may be created at Modulu:Color contrast/dok

--
-- 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
阳虚湿热吃什么中成药 空气栓塞取什么卧位 眼袋是什么原因引起的 唇周发黑是什么原因 什么是大三阳
咳嗽雾化用什么药 亚麻籽油是什么油 五个月宝宝可以吃什么水果 66年出生属什么生肖 胸变大是什么原因
sp是什么面料成分 抖m是什么意思 唇炎去药店买什么药 大姨妈吃什么食物好 手筋痛是什么原因
单亲家庭是什么意思 蒲公英和什么相克致死 露营需要准备什么东西 吃茶叶蛋有什么好处和坏处 什么是阴阳水
氟是什么hcv9jop6ns7r.cn 腌肉放什么调料hcv8jop9ns0r.cn 耳朵响吃什么药hcv7jop7ns2r.cn 花是植物的什么器官hcv9jop6ns0r.cn 灵芝有什么作用与功效hcv8jop3ns1r.cn
喉炎吃什么药hcv9jop3ns2r.cn 查抗体是做什么检查hcv9jop4ns6r.cn 雪茄为什么不过肺hcv8jop9ns1r.cn 二甲苯是什么东西hcv8jop2ns5r.cn 为什么空调不制冷yanzhenzixun.com
epa是什么营养物质hcv9jop0ns3r.cn 衣衫褴褛是什么意思hcv8jop0ns4r.cn 敛财什么意思hcv7jop4ns6r.cn 北京为什么是首都hcv8jop9ns5r.cn 姥姥的妈妈叫什么hcv8jop9ns4r.cn
1969年属什么生肖hcv9jop7ns3r.cn 总胆固醇高说明什么dayuxmw.com 老保是什么意思hcv8jop5ns4r.cn 治疗舌苔白厚用什么药hcv8jop9ns4r.cn 超声心动图检查什么96micro.com
百度