Title: [201625] trunk/Websites/webkit.org
- Revision
- 201625
- Author
- [email protected]
- Date
- 2016-06-02 16:14:33 -0700 (Thu, 02 Jun 2016)
Log Message
Update the example for wider color gamut images.
* blog-files/color-gamut/index.html:
Modified Paths
Diff
Modified: trunk/Websites/webkit.org/ChangeLog (201624 => 201625)
--- trunk/Websites/webkit.org/ChangeLog 2016-06-02 23:07:48 UTC (rev 201624)
+++ trunk/Websites/webkit.org/ChangeLog 2016-06-02 23:14:33 UTC (rev 201625)
@@ -1,5 +1,11 @@
2016-06-02 Dean Jackson <[email protected]>
+ Update the example for wider color gamut images.
+
+ * blog-files/color-gamut/index.html:
+
+2016-06-02 Dean Jackson <[email protected]>
+
Adding some sample images for a blog post on color.
* blog-files/color-gamut/Flowers-AdobeRGB.jpg: Added.
Modified: trunk/Websites/webkit.org/blog-files/color-gamut/index.html (201624 => 201625)
--- trunk/Websites/webkit.org/blog-files/color-gamut/index.html 2016-06-02 23:07:48 UTC (rev 201624)
+++ trunk/Websites/webkit.org/blog-files/color-gamut/index.html 2016-06-02 23:14:33 UTC (rev 201625)
@@ -1,48 +1,139 @@
-<style>
-body {
- text-align: center;
-}
-.flowers {
- width: 600px;
- height: 398px;
-}
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Examples of various wide-gamut images</title>
+ <style>
+ body {
+ text-align: center;
+ font-family: -apple-system;
+ -webkit-text-selection: none;
+ }
-.rose {
- width: 500px;
- height: 500px;
-}
-</style>
+ section > h2 {
+ margin: 10px 0;
+ }
-<img class="flowers" src=""
-<br>
-<p>sRGB</p>
+ section > img {
+ margin: 0 auto 15px auto;
+ display: block;
+ }
-<img class="flowers" src=""
-<br>
-<p>ProPhoto</p>
+ section.flowers > img {
+ width: 600px;
+ height: 398px;
+ }
-<img class="flowers" src=""
-<br>
-<p>Adobe RGB</p>
+ section.rose > img {
+ width: 500px;
+ height: 500px;
+ }
-<img class="flowers" src=""
-<br>
-<p>Out of gamut</p>
+ section > div > div {
+ display: inline-block;
+ }
-<img class="rose" src=""
-<br>
-<p>sRGB</p>
+ section > div > div > img {
+ margin: 0 auto 10px auto;
+ display: block;
+ }
-<img class="rose" src=""
-<br>
-<p>ProPhoto</p>
+ section.flowers > div > div > img {
+ width: 200px;
+ height: 133px;
+ }
-<img class="rose" src=""
-<br>
-<p>Adobe RGB</p>
+ section.rose > div > div > img {
+ width: 150px;
+ height: 150px;
+ }
-<img class="rose" src=""
-<br>
-<p>Out of gamut</p>
+ </style>
+ <script>
+ function init() {
+ var sections = Array.from(document.querySelectorAll("section"));
+ sections.forEach(function (section) {
+ var images = Array.from(section.querySelectorAll("div > div > img"));
+ images.forEach(function (image) {
+ image.addEventListener("click", function (event) {
+ var main = section.querySelector("img");
+ main.src = ""
+ var info = section.querySelector("p");
+ var imageType = "";
+ var suffix = event.target.src.match(/.*\-(\w+)\.jpg/)[1];
+ switch (suffix) {
+ case "AdobeRGB":
+ imageType = "Adobe RGB";
+ break;
+ case "oog":
+ imageType = "Out of sRGB Gamut";
+ break
+ default:
+ imageType = suffix;
+ }
+ info.textContent = "Currently showing: " + imageType;
+ }, false);
+ });
+ });
+ }
+
+ window.addEventListener("load", init, false);
+
+ </script>
+</head>
+<body>
+
+ <section class="flowers">
+ <h2>Flowers</h2>
+ <img src="" alt="Lots of red flowers">
+ <p>Currently showing: sRGB</p>
+ <p>Tap/click on one of the images below to replace the main image</p>
+ <div>
+ <div>
+ <img src="" alt="Lots of red flowers in the sRGB color space">
+ <span>sRGB</span>
+ </div>
+ <div>
+ <img src="" alt="Lots of red flowers in the ProPhoto color space">
+ <span>ProPhoto</span>
+ </div>
+ <div>
+ <img src="" alt="Lots of red flowers in the Adobe RGB color space">
+ <span>Adobe RGB</span>
+ </div>
+ <div>
+ <img src="" alt="Lots of red flowers showing which parts are outside of the sRGB gamut">
+ <span>Out of sRGB areas</span>
+ </div>
+ </div>
+ </section>
+
+ <section class="rose">
+ <h2>Rose</h2>
+ <img src="" alt="A red rose">
+ <p>Currently showing: sRGB</p>
+ <p>Tap/click on one of the images below to replace the main image</p>
+ <div>
+ <div>
+ <img src="" alt="A red rose in the sRGB color space">
+ <span>sRGB</span>
+ </div>
+ <div>
+ <img src="" alt="A red rose in the ProPhoto color space">
+ <span>ProPhoto</span>
+ </div>
+ <div>
+ <img src="" alt="A red rose in the Adobe RGB color space">
+ <span>Adobe RGB</span>
+ </div>
+ <div>
+ <img src="" alt="A red rose showing which parts are outside of the sRGB gamut">
+ <span>Out of sRGB areas</span>
+ </div>
+ </div>
+ </section>
+
+</body>
+</html>
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes