32 ms·
I think the idea is extremely interesting but after seeing 2 of the caveats at the end, I didn't have nearly as much confidence in the data. "3. If a color is
by thekevan 10y ago
I think the idea is extremely interesting but after seeing 2 of the caveats at the end, I didn't have nearly as much confidence in the data.
"3. If a color is found inside of a website's text it counts as being used. For example if the phrase "tan leather" is in a website's text, this scraper would say that the site uses tan. Additionally if the phrase "I understand" is in the text, it would still count as tan.
4. Colors added by external javascript are not included."
- paulhebert 10y agoHey thekevan, I've been busy between work and getting ready to move, but I had some free time today, so I sat down and resolved the first caveat you posted. I modified my REGEX. I also updated my scraping method to parse the DOM and pull out attributes instead of running the regex on the full website text. Anyways, thanks again for looking and commenting!
- thekevan 10y agoHey, glad you appreciate the comment and found it helpful. Nice improvement!
- paulhebert 10y agoHey thekevan, Thanks for the feedback. I agree that these are pretty major caveats. Hopefully you still found it interesting or useful. This is my first public release of this visualization and I plan to keep improving it over time. If it were a traditional software project I would probably categorize it as 'beta.' I've been spending a lot of time working on this in my free time and was curious whether it was something people would even be interested in. Seeing the positive feedback on HN and other sites has inspired me to put a larger focus on solving these problems as well as adding new features. (Analytics are showing about 1500 people have viewed it since I began sharing it a couple hours ago. Thanks everyone!) EDIT: up to around 4,500 hits as of 12:50 PST
- deleted 10y ago[deleted]
- cjwelborn 10y agoI was wondering why Twitter would use the the colors 'red', 'Red', 'rEd', and 'reD'. I think thekevan's comment explains it though. :)
- paulhebert 10y agoHaha, yep. Probably some camelCase that my parser accidentally interpreted as a color name. This bug is at the top of the list for resolution based on feedback I've been getting.
- iLoch 10y agoA different approach, if you wanted to do something more accurate (this is also a reasonable choice in my opinion, given that you have a fixed number of sites you're looking at) would be to use a headless browser like PhantomJS and traverse the rendered DOM checking the computed style with `window.getComputedStyle(el)`.
- paulhebert 10y agoThat's a good idea. That would be a much more accurate way to see which colors were actually used. A few other people in the comments also mentioned Selenium. I'll have to do some research. Stayed tuned for version 2.0!
- _nalply 10y agoOr even better, render it to an image file and retrieve the colours from the file.