Skip to main content
12 events
when toggle format what by license comment
Aug 4, 2023 at 0:30 history edited Liglo App CC BY-SA 4.0
deleted 2 characters in body
Jun 22, 2023 at 22:27 history edited Sebastian Voráč MSc. CC BY-SA 4.0
"var" shouldn't be use, please use "let". As for 2023 substr function is depreciated and bitwise is showing warning in eslint checks. We want to use Typescript in all examples of JS Stackoverflow even newbies should jump right on that.
Jun 22, 2023 at 22:19 comment added Sebastian Voráč MSc. Few things: "var" shouldn't be use, please use "let". As for 2023 substr function is depreciated and bitwise is showing warning in eslint checks. We want to use Typescript in all examples of JS Stackoverflow even newbies should jump right on that. I will edit the answer to match current standards.
Dec 20, 2022 at 3:50 comment added Rajesh Kanna colour += x.substring(x.length - 2); replace with this, it you do not want to use .substr since it is deprecated
Oct 22, 2020 at 21:37 comment added Joviano Dias Thanks! an adaptation to this to generate pastel / bright colors from a string only stackoverflow.com/a/64490863/403372
Aug 11, 2019 at 18:51 comment added avenmore Interesting that the colour is different for the same string on different browsers/oss - e.g. Chrome+Windows and Chrome+Android - my e-mail=>colour is blue on one and green on the other. Any idea why?
Mar 13, 2019 at 16:43 comment added Pryftan @Tjorriemorrie Upvoted for pointing out that it's colour and not color. Yes, yes, it's not really on topic but it's something that's important to me (in fact when typing it originally I spelt it 'colour' both times!). Thank you.
Oct 28, 2018 at 20:10 comment added Husterknupp I needed the alpha channel for transparency in my hex codes as well. This helped (adding two digits for the alpha channel at the end of my hex code): gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
Sep 19, 2016 at 18:27 history rollback Martin Tournoij
Rollback to Revision 1
Jun 26, 2014 at 20:57 comment added deviavir This code works awesome in conjunction with NoSQL auto-generated ID's, your colour will be the same every time for the same user.
May 30, 2013 at 10:31 history edited yckart CC BY-SA 3.0
deleted 31 characters in body
May 2, 2013 at 22:45 history answered Joe Freeman CC BY-SA 3.0