Jump to content

Шаблон:Darken

Мавод аз Википедиа — донишномаи озод
Ҳуҷҷатгузорӣ
Usage
Darkens a color.
Template can be substituted.
Input
  • first 3 parameters: color to darken as R, G, B color values, each numeric and in range 0..255
  • fourth parameter: amount by which to darken in % (0 = no change, 100 = black)
  • optional format parameter: name of a template to format the RGB values (the default is {{Hex3}} an alternative is {{RGB}})
Output
  • darkened color as hexadecimal color code
Examples
  • {{Hex3|240|160|200}} gives #F0A0C8
  • {{Darken|240|160|200| 0 }} gives #F0A0C8
  • {{Darken|240|160|200| 20}} gives #C080A0
  • {{Darken|240|160|200| 50}} gives #785064
  • {{Darken|240|160|200| 80}} gives #302028
  • {{Darken|240|160|200|100}} gives #000000
  • {{subst:Hex3|240|160|200}} gives #F0A0C8
  • {{subst:Darken|240|160|200| 0 }} gives #F0A0C8
  • {{subst:Darken|240|160|200| 20}} gives #C080A0
  • {{subst:Darken|240|160|200| 50}} gives #785064
  • {{subst:Darken|240|160|200| 80}} gives #302028
  • {{subst:Darken|240|160|200|100}} gives #000000
  • {{RGB|240|160|200}} gives rgb(240,160,200)
  • {{Darken|240|160|200| 0 |format=RGB}} gives rgb(240,160,200)
  • {{Darken|240|160|200| 20|format=RGB}} gives rgb(192,128,160)
  • {{Darken|240|160|200| 50|format=RGB}} gives rgb(120,80,100)
  • {{Darken|240|160|200| 80|format=RGB}} gives rgb(48,32,40)
  • {{Darken|240|160|200|100|format=RGB}} gives rgb(0,0,0)
  • {{subst:RGB|240|160|200}} gives rgb(240,160,200)
  • {{subst:Darken|240|160|200| 0 |format=RGB}} gives rgb(240,160,200)
  • {{subst:Darken|240|160|200| 20|format=RGB}} gives rgb(192,128,160)
  • {{subst:Darken|240|160|200| 50|format=RGB}} gives rgb(120,80,100)
  • {{subst:Darken|240|160|200| 80|format=RGB}} gives rgb(48,32,40)
  • {{subst:Darken|240|160|200|100|format=RGB}} gives rgb(0,0,0)
See also
  • {{Darken1}}
  • {{Lighten}}
  • {{Lighten1}}
  • {{Hex3}} for formatting as a standard "#RRGGBB" hex value
  • {{RGB}} for formatting as a standard "rgb(r,g,b)" hex value