Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!--
Any copyright is dedicated to the Public Domain.
-->
<!DOCTYPE html>
<html>
<head>
<title>CSS Filters: Hue Rotate an HTML Element Containing Colors with Multiple RGB Channels</title>
<link rel="author" title="Max Vujovic" href="mailto:mvujovic@adobe.com">
<style type="text/css">
#target {
filter: hue-rotate(90deg);
width: 150px;
height: 150px;
}
.color-strip {
height: 50px;
}
#color-strip-1 {
background-color: rgb(255, 128, 64);
}
#color-strip-2 {
background-color: rgb(128, 255, 64);
}
#color-strip-3 {
background-color: rgb(32, 64, 255);
}
</style>
</head>
<body>
<p>You should see a horizontal green strip, followed by a cyan strip, followed by a magenta strip.</p>
<div id="target">
<div id="color-strip-1" class="color-strip"></div>
<div id="color-strip-2" class="color-strip"></div>
<div id="color-strip-3" class="color-strip"></div>
</div>
</body>
</html>