Ruta Ruta - 1 year ago 103
HTML Question

How to get color of iframe in php webpage?

I want to create color picker which will select color from other websites onclick in PHP web page.

I have given option to add url for reference website for color selection in my webpage. And I am opening reference url in Iframe but I am not getting color of iframe on clicking of it.

<!DOCTYPE html>

<script src=""></script>
$('iframe').load(function(){ $($("iframe")[0].contentWindow).on('click', function(event) { alert('test'); });});
<iframe id="iframe" src="" width="500px;" height="500px">

Answer Source

I got alternate option to get colors from other website. To get color first I am getting screenshot of entered url using google pagespeed api and from that image I am getting colors codes

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download