Reputation: 419
I'm trying to get a green, cyan, purple and yellow large circle like this one: π΄, but there aren't any codes for one. Is there any way to change the code to change the color?
Upvotes: 40
Views: 49722
Reputation: 71
You can use this Unicode character for a black large circle and paint it with what you want using CSS: ⬀
⬤
Or this one (smaller): β
●
This is good, for example, to show colours samples instead of using JPG, PNG, etc.
<p style="color:pink;">Circle ⬀β Example</p>
<p style="color:#0000ff;">Circle ⬀β Example</p>
<p style="color:rgb(255, 255, 0);">Circle ⬀β Example</p>
Upvotes: 3
Reputation: 126
In both HTML and CSS, you can append xFE0E to get the text version and color that :
In HTML:
<div>❌</div>
<div style= "color: blue;">❌︎</div>
<div style= "color: green;">❌︎</div>
In CSS:
.css-symbol:after {
color: black;
content: "\274C";
}
.css-symbol1:after {
color: black;
content: "\274C\fe0e";
}
.css-symbol2:after {
color: blue;
content: "\274C\fe0e";
}
<div class="css-symbol">css: </div>
<div class="css-symbol1">css: </div>
<div class="css-symbol2">css: </div>
Mixing Both HTML and CSS:
div {
color: black;
}
.css-symbol:after {
color: blue;
content: "\274C\fe0e";
}
<div>❌</div>
<div>❌︎</div>
<div class="css-symbol"></div>
Upvotes: 10
Reputation: 1277
If using HTML, you can append xFE0E to get the text version and color that using CSS:
<span>🔴</span>
<span>🔴︎</span>
<span style="color: lime;">🔴︎</span>
Upvotes: 24
Reputation: 14135
Unicode is huge, even has Klingon, it has more colors and even smileys nowadays... Here you go, change the numbers to search and find what you need...
for i in range (10):
ii = int('0x1f7e0',base=16)+i
print('{:>15}'.format('[{}: {}] '.format(hex(ii),chr(ii))),end='')
if i%7==6:
print()
For cyan circle, try starting from 0x1f7df with range 1000... Also note that unicode color is best effort, so e.g. on a Klingon browser things may not display in colour...
Also, to find the codes of characters you have e.g.:
chars='π΅π΄π π‘π’π£π€π¦π₯π§π¨π©πͺπ«ππΆπ·πΈπΉπΊπ»'
for i,c in enumerate(chars):
print('[{}: {}] '.format(hex(ord(c)),c), end='')
if i%7==6:
print()
Gives:
[0x1f535: π΅] [0x1f534: π΄] [0x1f7e0: π ] [0x1f7e1: π‘] [0x1f7e2: π’] [0x1f7e3: π£] [0x1f7e4: π€]
[0x1f7e6: π¦] [0x1f7e5: π₯] [0x1f7e7: π§] [0x1f7e8: π¨] [0x1f7e9: π©] [0x1f7ea: πͺ] [0x1f7eb: π«]
[0x1f6d1: π] [0x1f536: πΆ] [0x1f537: π·] [0x1f538: πΈ] [0x1f539: πΉ] [0x1f53a: πΊ] [0x1f53b: π»]
Upvotes: 15
Reputation:
No. The color is inherent to the character -- there's a LARGE BLUE CIRCLE as well (U+1F535 - π΅), but no other colors are currently defined by the Unicode standard.
Upvotes: 18