Toggle menu
14
236
69
27.5K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 00:53, 25 February 2025 by Prd (talk | contribs) (Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE. --> == Usage == Converts three 8-bit numbers to hexadecimal. Useful for all sorts of color-related nefarious purposes. This template can be substituted. ; Input :* three parameters, each numeric in the range 0..255 (larger numbers will wrap around) :* <code>#=</code> ''(optional)'' allows you to change or remove the prefix for hex numbers (such as #) ; the default prefix is " #" (with a lea...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usage

Converts three 8-bit numbers to hexadecimal. Useful for all sorts of color-related nefarious purposes. This template can be substituted.

Input
  • three parameters, each numeric in the range 0..255 (larger numbers will wrap around)
  • #= (optional) allows you to change or remove the prefix for hex numbers (such as #) ; the default prefix is " #" (with a leading space to avoid the internal interpretation by MediaWiki as a numbered list item when returning the value from the template; this space does not alter the CSS validity of the value).
Output
  • a triplet of two-digit hex numbers

Examples

  • {{Hex3|0|0|0}}gives #000000
  • {{subst:Hex3|0|0|0}} gives #000000
  • {{Hex3|123|45|67}} gives #7B2D43
  • {{subst:Hex3|123|45|67}}gives #7B2D43
  • {{Hex3|255|255|255}} gives #FFFFFF
  • {{subst:Hex3|255|255|255}} gives #FFFFFF

See also

  • {{RGB}} for formating as a "rgb(r,g,b)" value
  • {{Hex2}} if you don't want three all at once.