Template:Random color/Digit
C
Usage
Returns six instances of {{Random color/Digit}}, e.g. a hex code. Like this: 4705E7. If you want to use it more than once on the same page, you need to specify different {{{1}}}s for seeds.
*1. {{Color sample|#{{Random color|125}}}} {{Random color|125}}
*2. {{Color sample|#{{Random color|126}}}} {{Random color|126}}
*3. {{Color sample|#{{Random color|127}}}} {{Random color|127}}
- 1. 1AD2E1
- 2. 9717F9
- 3. 9CD489
Note that invocations with the same seed will generate the same color, like this:
*1. {{Color sample|#{{Random color|123}}}} {{Random color|123}}
*2. {{Color sample|#{{Random color|123}}}} {{Random color|123}}
*3. {{Color sample|#{{Random color|123}}}} {{Random color|123}}
- 1. 98D049
- 2. 98D049
- 3. 98D049
Normally, it generates the colors randomly based on the time. If you want it to deterministically generate random colors (e.g. you're color-coding items in a series based on text, and you want them to be the same no matter what), specify a fixed parameter, like this:
*1. {{Color sample|#{{Random color|120|fixed=y}}}} {{Random color|120|fixed=y}}
*2. {{Color sample|#{{Random color|121|fixed=y}}}} {{Random color|121|fixed=y}}
*3. {{Color sample|#{{Random color|122|fixed=y}}}} {{Random color|122|fixed=y}}
- 1. 37DF59
- 2. 7B139D
- 3. BF57D1
Note that, e.g. using 120 with the fixed param will always produce "37DF59".
You can also use this with {{Tint}} (e.g. if you want to generate lighter, darker, or color-tinted palettes).
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.