Old Proxomitron Forums
Proxomitron Filters - Discussions welcome => Cosmetic => Topic started by: Arne on November 06, 2001, 11:38:07 AM
-
This is ScoJo's filter for background dimmer:
# Name: Bright Background Dimmer 1.0
# Author: ScoJo <ScoJo_at_isomedia_dot_com>
# Created: Jul 18, 2001
# Requires Proxomitron Naoko4 beta 5+
#
# Description:
#
# Lowers the brightness of bright backgrounds in the body tag, tables, table
# cells and any other tags with a bgcolor attribute. Works with both HTML
# and CSS.
#
# Note:
#
# The dimming filters won't affect named colors unless they are converted
# to their hex equivalents. This is what the color name list does with the
# help of the "Color Name to Hex Converter" filters.
#
# Test URLs:
#
# http://www.htmlhelp.com/reference/css/
# - Background colors defined in the <body> tag and a stylesheet
#
# http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey
# - Lots of bright table cells
#
# http://members.aol.com/axcel216/wxp.htm
# - Almost pure white background
#
# What's New:
#
# 1.0 - Nov 6, 2001
# - First release.
[Blocklists]
List.Color_Names = "..ListsColor Name List.txt"
[Patterns]
Name = "Color Name to Hex Converter - HTML [need-opt]"
Active = FALSE
Multi = TRUE
Bounds = "sw=$AV(*)"
Limit = 256
Match = "s(bgcolor|text|(a|v|)link)1=$AV($LST(Color_Names))"
"&&sw=([\"']+)2*"
Replace = " 1=292"
Name = "Color Name to Hex Converter - CSS [need-opt]"
Active = FALSE
Multi = TRUE
Limit = 48
Match = "(color|background(-color|))1 : $LST(Color_Names)"
Replace = "1:9"
Name = "Bright Background Dimmer - HTML"
Active = FALSE
Multi = TRUE
Bounds = "bgcolor=$AV(*)"
Limit = 256
Match = "bgcolor=(["']|)1"
"((#)#|$SET(#=#))"
"("
"(([0-9AB])#"
"|F$SET(#=B)"
"|E$SET(#=A)"
"|D$SET(#=9)"
"|C$SET(#=8)"
")"
"([0-9A-F])#"
")+{3}"
"["']+"
Replace = "bgcolor=1@1"
Name = "Bright Background Dimmer - CSS"
Active = FALSE
Multi = TRUE
Limit = 256
Match = "background(-color|)1 : ([^;}"'>]++)2 ("
"((#)#|$SET(#=#))"
"("
"(F$SET(#=B)"
"|E$SET(#=A)"
"|D$SET(#=9)"
"|C$SET(#=8)"
"|([0-9AB])#"
")([0-9A-F])#"
")+{3}"
"|"
"(F$SET(#=B)"
"|E$SET(#=A)"
"|D$SET(#=9)"
"|C$SET(#=8)"
"|([0-9AB])#"
")+{3}"
"|"
"(rgb()#"
"("
"([#0:199]( , |))#"
"|"
"(25$SET(#=20)"
"|24$SET(#=19)"
"|23$SET(#=18)"
"|22$SET(#=17)"
"|21$SET(#=16)"
"|20$SET(#=15)"
")([#0:9]( , |))#"
")+{3}"
"())#"
"|"
"(rgb()#"
"("
"([#0:79]%( , |))#"
"|"
"(10$SET(#=7)"
"|9$SET(#=6)"
"|8$SET(#=5)"
")([#0:9]%( , |))#"
")+{3}"
"())#"
")"
Replace = "background1:2@"
------------------------------------------
This is the file named Color Name List.txt
# Color Name List - NoAddURL
#
# Written by: ScoJo
# Created: Jan 24, 2001
# Last Modified: Nov 6, 2001
# Syntax: $LST(Color_Names)
# Variables: 9 is the hex equivalent
#
# This is a list of color names and their #hex equivalents
#
aliceblue $SET(9=#F0F8FF)
antiquewhite $SET(9=#FAEBD7)
aqua $SET(9=#00FFFF)
aquamarine $SET(9=#7FFFD4)
azure $SET(9=#F0FFFF)
beige $SET(9=#F5F5DC)
bisque $SET(9=#FFE4C4)
black $SET(9=#000000)
blanchedalmond $SET(9=#FFEBCD)
blue $SET(9=#0000FF)
blueviolet $SET(9=#8A2BE2)
brown $SET(9=#A52A2A)
burlywood $SET(9=#DEB887)
cadetblue $SET(9=#5F9EA0)
chartreuse $SET(9=#7FFF00)
chocolate $SET(9=#D2691E)
coral $SET(9=#FF7F50)
cornflowerblue $SET(9=#6495ED)
cornsilk $SET(9=#FFF8DC)
crimson $SET(9=#DC143C)
cyan $SET(9=#00FFFF)
darkblue $SET(9=#00008B)
darkcyan $SET(9=#008B8B)
darkgoldenrod $SET(9=#B8860B)
darkgray $SET(9=#A9A9A9)
darkgreen $SET(9=#006400)
darkkhaki $SET(9=#BDB76B)
darkmagenta $SET(9=#8B008B)
darkolivegreen $SET(9=#556B2F)
darkorange $SET(9=#FF8C00)
darkorchid $SET(9=#9932CC)
darkred $SET(9=#8B0000)
darksalmon $SET(9=#E9967A)
darkseagreen $SET(9=#8FBC8F)
darkslateblue $SET(9=#483D8B)
darkslategray $SET(9=#2F4F4F)
darkturquoise $SET(9=#00CED1)
darkviolet $SET(9=#9400D3)
deeppink $SET(9=#FF1493)
deepskyblue $SET(9=#00BFFF)
dimgray $SET(9=#696969)
dodgerblue $SET(9=#1E90FF)
firebrick $SET(9=#B22222)
floralwhite $SET(9=#FFFAF0)
forestgreen $SET(9=#228B22)
fuchsia $SET(9=#FF00FF)
gainsboro $SET(9=#DCDCDC)
ghostwhite $SET(9=#F8F8FF)
gold $SET(9=#FFD700)
goldenrod $SET(9=#DAA520)
gray $SET(9=#808080)
green $SET(9=#008000)
greenyellow $SET(9=#ADFF2F)
honeydew $SET(9=#F0FFF0)
hotpink $SET(9=#FF69B4)
indianred $SET(9=#CD5C5C)
indigo $SET(9=#4B0082)
ivory $SET(9=#FFFFF0)
khaki $SET(9=#F0E68C)
lavender $SET(9=#E6E6FA)
lavenderblush $SET(9=#FFF0F5)
lawngreen $SET(9=#7CFC00)
lemonchiffon $SET(9=#FFFACD)
lightblue $SET(9=#ADD8E6)
lightcoral $SET(9=#F08080)
lightcyan $SET(9=#E0FFFF)
lightgoldenrodyellow $SET(9=#FAFAD2)
lightgreen $SET(9=#90EE90)
lightgrey $SET(9=#D3D3D3)
lightpink $SET(9=#FFB6C1)
lightsalmon $SET(9=#FFA07A)
lightseagreen $SET(9=#20B2AA)
lightskyblue $SET(9=#87CEFA)
lightslategray $SET(9=#778899)
lightsteelblue $SET(9=#B0C4DE)
lightyellow $SET(9=#FFFFE0)
lime $SET(9=#00FF00)
limegreen $SET(9=#32CD32)
linen $SET(9=#FAF0E6)
magenta $SET(9=#FF00FF)
maroon $SET(9=#800000)
mediumaquamarine $SET(9=#66CDAA)
mediumblue $SET(9=#0000CD)
mediumorchid $SET(9=#BA55D3)
mediumpurple $SET(9=#9370DB)
mediumseagreen $SET(9=#3CB371)
mediumslateblue $SET(9=#7B68EE)
mediumspringgreen $SET(9=#00FA9A)
mediumturquoise $SET(9=#48D1CC)
mediumvioletred $SET(9=#C71585)
midnightblue $SET(9=#191970)
mintcream $SET(9=#F5FFFA)
mistyrose $SET(9=#FFE4E1)
moccasin $SET(9=#FFE4B5)
navajowhite $SET(9=#FFDEAD)
navy $SET(9=#000080)
oldlace $SET(9=#FDF5E6)
olive $SET(9=#808000)
olivedrab $SET(9=#6B8E23)
orange $SET(9=#FFA500)
orangered $SET(9=#FF4500)
orchid $SET(9=#DA70D6)
palegoldenrod $SET(9=#EEE8AA)
palegreen $SET(9=#98FB98)
paleturquoise $SET(9=#AFEEEE)
palevioletred $SET(9=#DB7093)
papayawhip $SET(9=#FFEFD5)
peachpuff $SET(9=#FFDAB9)
peru $SET(9=#CD853F)
pink $SET(9=#FFC0CB)
plum $SET(9=#DDA0DD)
powderblue $SET(9=#B0E0E6)
purple $SET(9=#800080)
red $SET(9=#FF0000)
rosybrown $SET(9=#BC8F8F)
royalblue $SET(9=#4169E1)
saddlebrown $SET(9=#8B4513)
salmon $SET(9=#FA8072)
sandybrown $SET(9=#F4A460)
seagreen $SET(9=#2E8B57)
seashell $SET(9=#FFF5EE)
sienna $SET(9=#A0522D)
silver $SET(9=#C0C0C0)
skyblue $SET(9=#87CEEB)
slateblue $SET(9=#6A5ACD)
slategray $SET(9=#708090)
snow $SET(9=#FFFAFA)
springgreen $SET(9=#00FF7F)
steelblue $SET(9=#4682B4)
tan $SET(9=#D2B48C)
teal $SET(9=#008080)
thistle $SET(9=#D8BFD8)
tomato $SET(9=#FF6347)
turquoise $SET(9=#40E0D0)
violet $SET(9=#EE82EE)
wheat $SET(9=#F5DEB3)
white $SET(9=#FFFFFF)
whitesmoke $SET(9=#F5F5F5)
yellow $SET(9=#FFFF00)
yellowgreen $SET(9=#9ACD32)
Best wishes
Arne 
Imici username: Arne