Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37846
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: input type="color" |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <EuOdnX4YMNxVk0vAnZ2dnUU7-LfNnZ2d@westnet.com.au> <h3pnucFua1sU1@mid.individual.net> <qr8fig$9qm$1@dont-email.me> <XnsAB0F86568E313eejj99@194.109.6.166> <-oydnbqUVL4VAkXAnZ2dnUU7-dnNnZ2d@westnet.com.au> |
| Date | 2019-11-23 13:47 +0100 |
| Message-ID | <XnsAB108C3B8DBBEeejj99@194.109.6.166> (permalink) |
Andrew Poulos <ap_prog@hotmail.com> wrote on 23 Nov 2019 in
comp.lang.javascript:
> On 22/11/2019 11:12 pm, Evertjan. wrote:
>> Jake Jarvis <pig_in_shoes@yahoo.com> wrote on 22 Nov 2019 in
>> comp.lang.javascript:
>
>>> I am on Windows 10 (chrome, firefox) and get presented with a color
>>> picker widget that looks like the one from Paint, where you CANNOT input
>>> the colour as hex
>>
>> You don't even need a colour picker when inputting a hex value,
>> as it is just a string per definition.
>
> Yep, almost everybody knows the difference between the #ff3300 and
>#ff5050 without actually needing to see the colours ;-)
Nonsense, either you pick a colour, or you type a colour.
If you want the user to type a colour,
you could show the colour after submission,
but that imho does not constitute to a colourpicker.
<style>
#showColour {width:120px;height:50px;border:black 2px solid;}
</style>
<div id='showColour'></div>
<br><br>
<input id='getColour'>
<script>
const getColour = document.querySelector('#getColour');
const showColour = document.querySelector('#showColour');
getColour.addEventListener("keyup", function() {
showColour.style.backgroundColor = this.value;
});
</script>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
input type="color" Andrew Poulos <ap_prog@hotmail.com> - 2019-11-21 15:12 +1100
Re: input type="color" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-11-21 12:24 +0100
Re: input type="color" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-11-21 15:36 +0100
Re: input type="color" Andrew Poulos <ap_prog@hotmail.com> - 2019-11-22 07:50 +1100
Re: input type="color" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-11-22 01:01 +0100
Re: input type="color" Jon Ribbens <jon+usenet@unequivocal.eu> - 2019-11-21 15:33 +0000
Re: input type="color" Andrew Poulos <ap_prog@hotmail.com> - 2019-11-22 07:46 +1100
Re: input type="color" Arno Welzel <usenet@arnowelzel.de> - 2019-11-22 10:26 +0100
Re: input type="color" Jake Jarvis <pig_in_shoes@yahoo.com> - 2019-11-22 12:08 +0100
Re: input type="color" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-11-22 13:12 +0100
Re: input type="color" Andrew Poulos <ap_prog@hotmail.com> - 2019-11-23 13:55 +1100
Re: input type="color" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-11-23 13:47 +0100
Re: input type="color" Andrew Poulos <ap_prog@hotmail.com> - 2019-11-24 09:43 +1100
Re: input type="color" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-11-24 10:12 +0100
Re: input type="color" Arno Welzel <usenet@arnowelzel.de> - 2019-11-25 09:56 +0100
Re: input type="color" Jon Ribbens <jon+usenet@unequivocal.eu> - 2019-11-25 12:36 +0000
Re: input type="color" Julio Di Egidio <julio@diegidio.name> - 2019-11-25 07:41 -0800
csiph-web