Comments (4)
Hi. Yep, thats pretty simple if I got what you trying to archive. I modified "test_attach_to_input" example, you can download it here https://catface.ru/userfiles/media/udata_1586218351_oskjtrqp.rar
from kellyc-color-picker.
So the color showed are only at startup some basic RGB colors
Ah, ok, basically some thing similar can be found here
https://nc22.github.io/HTML5-Color-Picker/examples/test_one_colorpicer_and_multiple_inputs.html
so
The text I need, a HEX format, would be showed in a div
only thing you need is add div
and add in "change" event string that will update text in that div when colorwheel color changes
for example add before string "self.selectedInput.value" something like
document.getElementById('ad3d-colorwheeldisplay').innerText = self.getCurColorHex();
this will set text in div with current color picker color in hex format
from kellyc-color-picker.
I Have placed a page on Git (here: https://github.com/Allday3D/LOL/tree/master/data/index.html) but start to think that it will not work for me or not yet at least. Need to learn.
Yes, in your case you also need to change css style because you use pseudo element to display text for some reason. So code will look like in pathes below (also I wasnt accurate in example in my prev comment - you need assign value to .innerText or .innerHTML of element to update it content)
https://github.com/NC22/LOL/commit/d12d338265bfb6cb9a27764bd7c9d08e4a577eaf
https://github.com/NC22/LOL/commit/5f5969dfa07ff30de280b2df62d3c381f121de0b
from kellyc-color-picker.
isn't a good thing? Would it be better otherwise? Sorry for asking but maybe I learn something from it. Thanks again for everything.
Depends on what you trying to achive
In common case you can put that text in div element and overwrite it on change color by assign value to innerText as I mention before
so css will be like
#ad3d-colorwheeldisplay {
background-color: rgb(220, 220, 220);
color: #ffffff;
text-shadow: 0 0 4px #333333;
}
and dont need "before" css pseudo element. Later if you need you can add classes to this div element in javascript like I did with "assigned" and change css for different cases like here https://github.com/NC22/LOL/commit/d12d338265bfb6cb9a27764bd7c9d08e4a577eaf
from kellyc-color-picker.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kellyc-color-picker.