Follow By Email

Tuesday, May 31, 2022

[New post] Colour Notes 7: Colourspaces and rendering

Site logo image hoakley posted: "Painters match colours by eye, but computers and printers need a mechanism to ensure that the colours they display are as faithful as possible. To give you an idea of how badly this can go wrong, here are two different images of the same painting by Artur" The Eclectic Light Company

Colour Notes 7: Colourspaces and rendering

hoakley

May 31

Painters match colours by eye, but computers and printers need a mechanism to ensure that the colours they display are as faithful as possible. To give you an idea of how badly this can go wrong, here are two different images of the same painting by Arturo Michelena of Charlotte Corday (1889), both available from Wikimedia Commons.

michelenacharlottecorday

Arturo Michelena (1863–1898), Charlotte Corday (1889), oil on canvas, 234 x 315.5 cm, Galería de Arte Nacional, Caracas, Venezuela. Wikimedia Commons.

Those are clearly the same original painting, but their tone and colours are quite different.

Even when digital images have been taken carefully and appear true to the original, the biggest problem when using computers to handle colour is that their peripherals, displays and printers in particular, can only handle a limited range of colours. Although it uses colour coordinates which are rather more complex than the RGB which you're used to, this is well illustrated in the diagram below.

A CIE 1931 colour space chromaticity diagram using xyz co-ordinates, with a device gamut shown by the triangle.

A CIE 1931 colour space chromaticity diagram using xyz co-ordinates, with a device gamut shown by the triangle.

Most of us are capable of perceiving all the colours shown in the coloured area. However, the small triangle within that shows the extent of the colours which can be displayed on a specific device, its colour gamut.

Let's assume we have a perfect camera which captures colours from nature completely faithfully, and whose gamut is human, right out to the edges of the outer rounded triangle. When you take a photo with that camera and import it to your Mac, that vast range of different colours will be converted, pixel by pixel, into the Mac's internal representation for colour.

Long ago, in the early days of computer colour systems, each pixel was represented by a single byte for the red value, one for the green, and one for the blue: 24 bits in all. When you looked at what should have been a smooth colour gradient, it was easy to see the step changes in colour, which arose because of the constrained representation.

macOS now normally uses three channels for the colour of each pixel, each represented as a floating-point number between 0.0 and 1.0. So the Mac's internal colour format ensures remarkably faithful representation for all the colours captured by this perfect camera. But when we view the image on our Mac's display, that can only show those colours within the smaller triangle, its gamut.

The problem colour management is trying to solve is how best to achieve that: getting an image to look right even when it's displayed on or output to a device with a relatively limited gamut, by the process of colour rendering.

rendering1

This screenshot from the specialist colour tool CT&A from BabelColor shows how one colour might be rendered. At the top centre is the standard CIE colour chart with two colourspaces marked out. The inner is ColorMatch, and the outer Wide Gamut, which doesn't quite fill the colourspace, but comes close.

The superimposed circles in the middle are the whitepoints for those gamuts, which here coincide. Suppose our perfect camera recorded some pixels in an image which are very strong pink, at a point represented by the small green square, and that our display, perhaps, can only cope with the ColorMatch gamut, in the inner triangle.

For macOS to convert that pink to one which the display can show, the green square is going to be mapped to the orange square (on the lower side of the smaller triangle). That's rendering the original colour to one which can be output by the display.

The large rectangles of colour at the bottom of the window show (on the left) the original colour before rendering, and (on the right) the rendered colour. These are also shown in the samples on the right of the window, where you can see that the pinks are very close, but not quite the same.

So the first task of colour rendering is to convert colours which are outside the output gamut to colours which are within that gamut.

There are several different ways of doing that, known as rendering intents, which I'll mention below. However, rendering doesn't just affect colours which are outside the output gamut. If it just squished all those onto the edge of the output gamut and didn't change other colours, then many colours which look different in reality would end up appearing the same, in what's called clipping.

rendering2

So rendering the small green square here results in the colour represented by the small orange square, even though the original colour is inside the smaller triangle.

rendering3

Another problem arises when the white points of the original and output gamuts are different. In the first two windows, they were identical, but here is an example of rendering where the white point changes, from the green circle to the orange one. This also shifts all the colours around, as seen with the green and orange squares.

Normally we don't see colour rendering in action, because it's handled internally. When it works correctly, you're very unlikely to notice any difference, although colour measuring instruments can show the changes that have taken place. Note that rendering doesn't change the colour values in the original image, it just adjusts what is output to a device like a display or printer.

The best way to see rendering in action is with a photo image editor such as Affinity Photo, or Adobe Photoshop. They have a soft proofing feature, to give you a preview of how an image will be rendered. In Affinity Photo, you can select a colour profile or gamut to use, the rendering method (rendering intent), and whether there should be compensation applied to the black point to obtain consistent black rendering.

rendering4

rendering5

The optional Gamut Check shows your original image with all the pixels outside the output gamut marked in grey - here many of the greens. This gives you a good idea as to how much adjustment there's going to have to be when rendering the colour. In this photo, a lot!

rendering6

Rendering intent is the term describing the principles used for rendering. The four standard options available are:

  • Perceptual - this shrinks the entire colour space into the output one, shifting all the colours so as to preserve their relationships. This is the method described above.
  • Saturation - this maintains the relative saturation of the colours, and isn't normally suitable for photographic images.
  • Relative Colorimetric - this only alters colours outside the output colour space, mapping them to colours inside it, but not altering those already inside the output colour space. Sometimes known as 'clipping', this isn't normally used with photographic images as it tends to produce areas of identical flat colour where clipping occurs.
  • Absolute Colorimetric - this ensures that colours are matched exactly, and is intended for use in design work where precise colour is more important than relative colour.

Working with most photographic images, you want the whole image to look right, thus should choose perceptual rendering intent. Absolute colorimetric rendering intent is most useful when you want precise matching, for example with corporate colours in design.

This should now explain how your coloured images are rendered to the display, or for print. Whether they look right on that output depends on making sure that the display or printer is properly colour calibrated, so that the colours generated are correct. If you're making giclée prints of your original paintings, that's what your customers will expect.

Comment
Like
Tip icon image You can also reply to this email to leave a comment.

Unsubscribe to no longer receive posts from The Eclectic Light Company.
Change your email settings at manage subscriptions.

Trouble clicking? Copy and paste this URL into your browser:
http://eclecticlight.co/2022/05/31/colour-notes-7-colourspaces-and-rendering/

Powered by WordPress.com
Download on the App Store Get it on Google Play
at May 31, 2022
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

[New post] Godzilla Library Edition by James Stokoe, John Layman, Chris Mowry, Alberto Ponticelli, Dean Haspiel

...

  • [New post] Godzilla Library Edition by James Stokoe, John Layman, Chris Mowry, Alberto Ponticelli, Dean Haspiel
    ...
  • Chocolate Chip M&M Cookies + AUGUST BAKING CHALLENGE
    The universe wants you to make cookies, just sayin'  ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ...
  • Your Guide to Winter Squash
    ...

Search This Blog

  • Home

About Me

PH News Net
View my complete profile

Report Abuse

Labels

  • 【ANDROID STUDIO】Data Binding
  • 【ANDROID STUDIO】Data Binding Show or Hide Progressbar
  • 【ANDROID STUDIO】Data Binding with object
  • 【ANDROID STUDIO】Live Data
  • 【ANDROID STUDIO】Live Data with Data Binding
  • 【ANDROID STUDIO】View Model
  • 【ANDROID STUDIO】ViewModel Data Binding
  • 【ANDROID STUDIO】ViewModel Data Binding Factory
  • 【FLUTTER ANDROID STUDIO and IOS】Common Weight and Mass Conversions
  • 【FLUTTER ANDROID STUDIO and IOS】custom lite rolling switch
  • 【FLUTTER ANDROID STUDIO and IOS】Managing State
  • 【FLUTTER ANDROID STUDIO and IOS】Simple Stopwatch
  • 【FLUTTER ANDROID STUDIO and IOS】Specify Height and Width in Percent with respect to the screen
  • 【FLUTTER ANDROID STUDIO and IOS】tab key or shift focus to next text field
  • 【FLUTTER ANDROID STUDIO and IOS】Weight Convert
  • 【GAMEMAKER】Display
  • 【GAMEMAKER】Draw Name
  • 【GAMEMAKER】enemy fire continously
  • 【GAMEMAKER】Energy
  • 【GAMEMAKER】Explosion
  • 【GAMEMAKER】Health Bar
  • 【GAMEMAKER】Hearts
  • 【GAMEMAKER】Highscore
  • 【GAMEMAKER】Horizontal Shooter
  • 【GAMEMAKER】Inventory
  • 【GAMEMAKER】keep the player facing the mouse pointer
  • 【GAMEMAKER】one way to do a fog of war
  • 【JAVASCRIPT】implements draggable progress bar
  • 【JAVASCRIPT】Math Quiz GAME export CSV
  • 【LARAVEL】PHPWord pass dynamic values when export to ms docx and download using PHPWord
  • 【PYTHON OPENCV】Image classification in Keras using several models for image classification with weights trained on ImageNet
  • 【PYTHON PYTORCH】metric classification accuracy
  • 【PYTHON PYTORCH】metric classification report
  • 【PYTHON】algorithm compare all classification models
  • 【PYTHON】algorithm evaluation k fold cross validation
  • 【PYTHON】leave one out cross validation
  • 【PYTHON】metric confusion
  • 【PYTHON】metric regression mae
  • 【VISUAL Csharp】Enumerate network resources
  • 【VISUAL Csharp】File Properties
  • 【Visual Studio VB NET】Clear Saved Passwords
  • 【Visual Studio VB NET】Swap mouse button
  • 【Visual Studio VB NET】System Properties Remote
  • 【Visual Studio Visual Csharp】Get computer name
  • 【Visual Studio Visual Csharp】Get Disk Free Space
  • 【Visual Studio Visual Csharp】Get processor type
  • 【Visual Studio Visual Csharp】IP Address
  • 【VISUAL VB NET】Delete Form Data
  • 【VISUAL VB NET】Delete History
  • 【VISUAL VB NET】Hibernate
  • 【VISUAL VB NET】Keyboard Properties
  • 【VISUAL VB NET】Sound
  • 【VISUAL VB NET】Tray Icon
  • 【VISUAL VB NET】Web Browser
  • 【Vuejs】 table implements adding and deleting
  • 【VUEJS】seamless carousel effect Marquee using transition

Blog Archive

  • October 2023 (25)
  • September 2023 (1209)
  • August 2023 (1224)
  • July 2023 (1259)
  • June 2023 (1245)
  • May 2023 (1194)
  • April 2023 (1137)
  • March 2023 (1163)
  • February 2023 (1107)
  • January 2023 (1313)
  • December 2022 (1358)
  • November 2022 (1353)
  • October 2022 (1300)
  • September 2022 (1208)
  • August 2022 (1279)
  • July 2022 (1228)
  • June 2022 (1164)
  • May 2022 (1176)
  • April 2022 (1184)
  • March 2022 (1337)
  • February 2022 (1232)
  • January 2022 (1321)
  • December 2021 (1932)
  • November 2021 (3065)
  • October 2021 (3186)
  • September 2021 (3078)
  • August 2021 (3175)
  • July 2021 (3198)
  • June 2021 (3136)
  • May 2021 (1856)
Powered by Blogger.