How to change the color of a unicode character - unicode

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?

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.

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>

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: πŸ”»]

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>

Related

Text Popups OnMouseOvers, No WeaselOvers Allowed

Jeopardy: "a gimmick to separate it from other quiz and game shows. Because the prompt is the answer!"
This weaselly question appears to be OK, .. But what a terrible coding (Hole) I've dug for myself in the process.
I have a problem, in that I want to create several sets of:-
-- [ div text popup rollovers ]
-- [ that appear and disappear again ], but only when a mouse goes into, and then out of an <a href link, as in:-
<a href="#"
onmouseover=show('popup1')
onmouseout=hide('popup1')>Help Text One</a>
<br /><br /><br />
<a href="#"
onmouseover=show('popup2')
onmouseout=hide('popup2')>Help Text Two</a>
This weasel is an insidious creature to track down, being as all the other weasels are far too clever by half, and for the life of me I couldn't see what was really happening as the other weasels were running: nor even where the Ron Weaselly code went in my Harried Pottering Code.
This website has helped me so many times in the past, that I wanted to give a [ pop-goes-the-weasel ] back to future generations.
The answer to my rollover weasels is found here, that also has a rider attached:-
"It’s also perfectly fine to ask and answer your own question, as long as you pretend you’re on Jeopardy! β€” phrase it in the form of a question."
Here's the [ text rollover popup solution ] that I end up with, and this was after a day and a half of mumbling to myself and re-editing on codepen.io, then mumbling some more to get the simple coded weasel to popup on command.
Note: the resulting rollover code doesn't look that impressive, but it works. My issue now is whether it could made to work even better, and be made even simpler without me getting lost in the Triwizard Maze, populated by popping weasels of course.
Not sure if codebase.io examples are allowed here, being as all of the demonstrations I've seen thus far are in (fiddle.)
So I've created a fiddle account for you knowledgeable folks to give it the once over.
** Note: I've also magicked up a rather helpful line of helpful text: that actually gets changed by JS, to then reflect the state of the variables going (on) in the JavaScript section, the (alert) popup kept stopping the code from working.
The weaselly fiddly link is as follows:-
https://jsfiddle.net/terrymcb/4gL0ntvs/
Here's the HTML code, three blind rollover links that correspond to three divs, that are individually nested.
<p>DIV BOX ROLLOVERS</p>
<a href="#"
onmouseover=javascript:show('gcinfo')
onmouseout=javascript:hide('gcinfo')>TEXT-1</a> JS-1
<br /><br /><br />
<a href="#"
onmouseover=javascript:show('ucinfo')
onmouseout=javascript:hide('ucinfo')>TEXT-2</a> JS-2
<br /><br /><br />
<a href="#"
onmouseover=javascript:show('uainfo')
onmouseout=javascript:hide('uainfo')>TEXT-3</a> JS-3
<br /><br />
<p id="tValue"> Show in-out OBJ value. </p>
Here's the DIVS laid out.
<div id="ucinfo"><!-- which is hidden -->
<div class="dialog"><!-- is the common style -->
<p>This is the ucinfo included text.</p>
</div>
</div>
<div id="uainfo"><!-- which is hidden -->
<div class="dialog"><!-- is the common style -->
<p>This is the uainfo included text.</p>
</div>
</div>
<div id="gcinfo"><!-- which is hidden -->
<div class="dialog"><!-- is the common style -->
<p>This is gcinfo included text.</p>
</div>
</div>
The CSS, dialog box followed by three outer classes: (visible & display?) Over kill perhaps.
.dialog {
position: fixed;
top: 50px;
right: 50px;
bottom: 50px;
left: 150px;
z-index: 10;
display: flex;
padding: 1em;
background-color: rgba(0,0,0,.100);
/* opacity: 1; */
pointer-events: pointer;
transition: .25s ease-out;
}
#uainfo {
visibility: hidden;
display: none;
}
#ucinfo {
visibility: hidden;
display: none;
}
#gcinfo {
visibility: hidden;
display: none;
}
The all important JavaScript, note: I've cleaned the variables on every call, it seems to keep the function functioning, but I might well be paranoid at this point where JS is concerned. What I do know for a fact, is that calling the document.getElementById( direct keeps failing with the second call to JS, and I've no idea why! - Which is why the variables disp and vist have been used.
function hide(obj) {
disp0 = '0';
visp0 = '0';
disp0 = document.getElementById(obj);
visp0 = document.getElementById(obj);
disp0.style.display="none";
visp0.style.visibility="hidden";
document.getElementById("tValue").innerText='hide ' + obj;
}
function show(obj) {
disp1 = '0';
visp1 = '0';
disp1 = document.getElementById(obj);
visp1 = document.getElementById(obj);
disp1.style.display="block";
visp1.style.visibility="visible";
document.getElementById("tValue").innerText='show ' + obj;
}
That's all folks ..

Is there a root path you need to set for glyph svg icons to work in controls?

I have a toolbar copied from the example site working but none of the glyph icons are showing up. I can confirm that the same svg icons are working in non controls.
Toolbar code where glyphs are not working.
<template>
<ui-page page-title="Toolbars" animate>
<style>
.example-container {
position: relative;
height: 450px;
border: 1px solid #f0f0f0;
}
</style>
<ui-content padded scroll>
<ui-container>
<ui-toolbar primary>
<ui-input-group>
<ui-input width="12em">
<ui-input-addon glyph="icon-fill-search"></ui-input-addon>
</ui-input>
<ui-dropdown value="0">
<ui-list-item value="0">Site</ui-list-item>
<ui-list-item value="1">Posts</ui-list-item>
<ui-list-item value="2">Docs</ui-list-item>
</ui-dropdown>
</ui-input-group>
<ui-filler></ui-filler>
<ui-button-group>
<ui-button small light square glyph="icon-moon-undo2"></ui-button>
<ui-button small light square glyph="icon-moon-redo2"></ui-button>
</ui-button-group>
<ui-button small light square glyph="icon-moon-cog" dropdown.bind="btnMenu"></ui-button>
<ui-divider></ui-divider>
<ui-button light>Save</ui-button>
<ui-button light>Cancel</ui-button>
</ui-toolbar>
<br/>
<ui-menu ref="btnMenu">
<ui-menu-section>Actions</ui-menu-section>
<ui-menu-item glyph="icon-moon-pencil">Edit</ui-menu-item>
<ui-menu-item glyph="icon-moon-search">Search</ui-menu-item>
<ui-menu-item glyph="icon-moon-bin">Delete</ui-menu-item>
<ui-menu-section>Options</ui-menu-section>
<ui-menu-item glyph="icon-moon-alarm">Notifications</ui-menu-item>
<ui-menu-item glyph="icon-moon-cog">Settings</ui-menu-item>
</ui-menu>
</ui-container>
</ui-content>
</ui-page>
</template>
Non control glyph works as you can see when you select the glyphs page, then when you select the Hello page you can see that the toolbar is missing it's glyphs.
-->
See image:
Can you check if the icomoon svg file has been loaded, the icons prefixed glyph- is included in the framework by default, however the extra icons icomoon and hawcons need to be included in your app.html file
<compose view="../glyphs/icomoon.svg"></compose>
<compose view="../glyphs/hawcons-linear.svg"></compose>
<compose view="../glyphs/hawcons-filled.svg"></compose>
https://github.com/adarshpastakia/aurelia-ui-framework/blob/master/src/app.html

Change border color of required Chosen jQuery select boxes

Simply put, how can you change the border color of a Chosen jQuery select box? I am assuming you can do it with CSS but I can't quite figure out how.
$(".pnChosen").chosen({
search_contains: true
});
<select required class="pnChosen"></select>
I can use this to change the border color of all of them, but I only want to change ones that I mark as required.
.chosen-container{
border: 1px solid red;
}
And I also want to change the background color when they are disabled if that is possible.
You can use chosen's option inherit_select_classes.
Give required class on select element, and set css for this selector .required>chosen-single
$(".pnChosen").chosen({
search_contains: true,
inherit_select_classes: true
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.jquery.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.css" rel="stylesheet" />
<style>
.required>.chosen-single {
border: 1px solid #EE0000;
}
</style>
<select required class="pnChosen required">
<option>Option 1</option>
<option>Option 2</option>
</select>
Another option is to use the adjacent sibling combinator (+) selector in CSS to achieve the desired styling.
For example:
HTML
<select id="myselect" required="required">
...
</select>
<div id="myselect_chosen" class="chosen-container chosen-container-single">
<a class="chosen-single">
...
</a>
</div>
CSS
select:required + div.chosen-container a { ... }
This would apply the desired style(s) to your div.chosen-container a DOM element immediately following select:required. Just be aware that you may still have to establish CSS priority if you're attempting to override an existing Chosen style so your definitions can supersede any existing chosen styles.
Reference: Adjacent Sibling Combinator

How to arrange field name and the fielt itself properly?

Code:
#inputfield {
width:300px;
border: 2px solid #3f3f3f;
height:30px;
font-size:20px;
padding-left:5px;
color: #6f6f6f;
}
#inputname {
margin-right:10px;
font-size:20px;
color: #3f3f3f;
}
<a id="inputname>Name:</a><input name="name" id="inputfield" type="text">
<a id="inputname>Other Name:</a><input name="other" id="inputfield" type="text">
<a id="inputname>Other Other Name:</a><input name="other_2"
id="inputfield" type="text">
The names and the fields look out of place. I am trying to make the form organized like the way it looks on this page:
https://secure.hulu.com/signup
Things to change:
Don't use id. Use class and .inputfield
Make sure to set the display to inline-block so that the browser will honor the width
You don't want <a> tags. You want <label> tags.
Wrap each line of your form in its own <div> and use that to set the line height and spacing.

How to make submit button in line with the search fields?

I have a search field and I want my search button image to be in line with the search fields but it isn't. I have used div tags to try and move it but it always moves the search fields not just the button!
HELP!
<form action="weezyresults.php" method="post">
<input type="text" name="search" size="35" value="Job Title e.g. Assistant Manager"
style="background-color:white; border:
solid 1px #6E6E6E; height: 30px; font-size:18px;
vertical-align:9px;color:#bbb"
onfocus="if(this.value == 'Job Title e.g. Assistant Manager'){this.value = '';this.style.color='#000'}" />
<input type="text" name="searchterm" size="35" value="Location e.g. Manchester"
style="background-color:white; border:
solid 1px #6E6E6E; height: 30px; font-size:18px;
vertical-align:9px;color:#bbb"
onfocus="if(this.value == 'Location e.g. Manchester'){this.value = '';this.style.color='#000'}" />
<input type="image" src="but.tiff" alt="Submit" height="30" width="60">
</form>
Thanks!
James
It looks like it's inline to me. You possibly have a problem because your using a tiff file for that button. I'd convert that to a JPG.
If yours doesn't look like this you possibly have some other css in your project that is breaking your layout.
Use floats - eg: input { float: left } on each element, that should do the trick.
Try this out
http://jsfiddle.net/TMy6p/
I have moved your styling into an external stylesheet to tidy it up a bit and help you to avoid repeating the same style tags on elements.
basically you just need to float elements and give them widths.