Revision as of 14:38, 17 December 2015 by Wolthera (Talk | contribs) (Icc profiles)

Jump to: navigation, search

You may have heard that Krita has something called color-management. Or maybe you just wondered what all these 'color model' and 'color profile' things you can find in the menus mean. Color management is pretty useful for people who work in digital imaging proffesionaly, and hopefully this page will explain why.

Basic info

If you've never worked with color management before, and have no clue what it is, then know that you've probably been working in the 8bit RGB colour space with the sRGB profile. This means you can choose for sRGB built-in or sRGB-elle-v2-srgbtrc.icc. With the new color space browser this profile is marked with (default) when using 8bit.

We'll go into what these terms mean in the theory, but if you're here only for trying to figure out which is the default, you now know it. Maybe, after reading this, you may feel like changing the default.

What is the problem?

To explain the point of colour management, you'd first need to learn which problem colour management tries to solve.

Let us imagine a kinder garden:

The class of 28 children is subdivided in groups of 7. Each group has their own table.

The teacher gives them a painting assignment: They need to paint a red triangle, a blue square, a green circle and put a yellow border around the three. The kids are very experienced with painting already, so the teacher can confidently leave the smarter ones to their own devices, and spent more time on those who need help.

The following results come from painting:

Even though all groups had the same assignment, each group's result looks different.

Krita 2 9 colormanagement group1.png

Group 1 had vermillion red, citron yellow and ultramarine blue to their disposal. This means their triangle looks nice and red, but their circle's green is muddy. This is because ultramarine is too dark of a blue to create nice greens with.

Krita 2 9 colormanagement group2.png

Group 2 had magenta red, citron yellow and cerulean blue. Magenta is a type of red that is closer to pink, opossed to vermillion, which is closer to orange. However, their green looks nice because cerulean is a much lighter blue.

Krita 2.9 colormanagement group3.png

Group 3 had vermillion red, citron yellow, edmerald green and cerulean blue. They didn't mix their green, and thus ended up with a purer colour.

Krita 2.9 colormanagement group4.png

Finally, group 4 has Vermillion red, citron yellow and cerulean blue. Their colours probably look like what you imagined.

Now, these are kindergarteners, so this isn't the largest problem in the world. However, imagine that something like this happened at a printing company? Imagine four printers printing the same magazine with wildly different results? That would be disastrous!

For this purpose, we invented colour management.

What is colour management?

Colour management is a set of systems that tries to have the same colour translate properly between colour devices.

It usually works by attempting to covert a colour to the reference colour space XYZ. XYZ is a coordinate system that has a spot for all colours that the avarage human eye can see.

From XYZ it can then be translated back into another device space, such as RGB(for screens), or CMYK(for printers).

Krita has two systems dedicated to colour management. On one hand we have lcms2, which deal with Icc-profiles, and on the other we have OCIO, which deal with LUT colour management.

To give a crude estimate, ICC profiles deal with keeping colours consistent over many interpretations of devices(screens, printers) by using a reference space, and LUT deals with manipulating the interpretation of said colours.

Within both we can identify the following color spaces:

Device spaces
These are made with special profiling devices, and are unique per screen. You set these in Krita's colour management tab. By default we assume sRGB for screens, but it's very likely that your screen isn't exactly fitting sRGB, especially if you have a high quality screen, where it may be a bigger space instead. Device spaces are also why you should first consult with your printer what profile they expect. Many printing houses have their own device profiles for their printers, or may prefer doing color conversion themselves.
Working spaces
These are delivered alongside Krita for ICC, and downloadable from the OCIO website for OCIO. Working spaces are particularly nice to do colour calculations in, which programs like Krita do often. It's therefore recommended to have a working space profile for your image.
Aesthetic or Look spaces
These are special spaces that have been deformed to give a certain look to an image. Krita doesn't deliver Look profiles for ICC, nor does it yet support Look spaces for OCIO.

Color managed workflow

These types have certain roles within the basic color management workflow. The typical color management workflow looks as following:

A typical example of a color managed workflow. We have input from scanners and cameras, which we convert to a working space that can be used between different editing software, and is converted to an output space for viewing on screen or printing.

In a traditional color managed workflow, we usually think in terms of real world colors being converted to computer colors and the other way around. So, for example photos from a camera or scanned in images. If you have a device space of such a device, we first assign said device space to the image, and then convert it to a working space.

We then do all our editing in the working space, and use the working space to communicate between editing programs. In Krita's case, due to it having two color management systems, we use ICC profiles between programs like Gimp 2.9+, Inkscape, Digikam and Scribus, and OCIO configuration between Blender and Natron.

You also store your working files in the working space, just like how you have the layers unmerged in the working file, or have it at a very high resolution.

Sometimes, we apply aesthetic or 'look' spaces to an image as part of the editing process. This is rather advanced, and probably not something to worry about in Krita's case.

Then, when we're done editing, we try to convert to an output space, which is another device space. This can be CMYK for printers or a special screen RGB profile. When you are dealing with professional printing houses, it is best to ask them about this step. They have a lot of experience with doing the best conversion, and may prefer to do the conversion from your working space to the device space of their printers.

Another form of output is the way your screen displays the color. Unlike regular output, this one is done all the time during editing: After all, you need to be able to see what you are doing, but your screen is still a device with a device space, so it does distort how the image looks. In this manner, you can see your screen as a set of binoculars you have to look through to see your image at all.

So what does this mean?

When we paint from scratch, we can see our screen profile as the input space, because we use it to determine what colors to pick. This somewhat simplifies the workflow, but makes the screen profile and viewing conditions more important.

Now, photographers and people who do a tricky discipline of VFX called 'color grading' will go completely mad over trying to get the colors they put in to come out 100% correctly, and will even count in factors like the time of day and the color they painted their walls. For example, if the wall behind your computer is pure red, your eyes will adjust to be less sensitive to red, which means that the colors they pick in the program could come out redder. We call these the viewing conditions.

Thankfully, artists have to worry a slight bit less about this. As illustrations are fully handmade, we are able to identify the important bits and make appropriate contrasts between colors. This means that even if our images turn out to be slightly redder than intended, it is less likely the whole image is ruined. If we look back at the kindergarten example above, we still understand what the image was supposed to look like, despite there being different colors on each image. Furthermore, because the colors in illustrations are deliberately picked, we can correct them more easily on a later date.

That said, for artists it is very useful to understand the working spaces. Different working spaces give different results with filters and mixing, and only some working spaces can be used for advanced technology like HDR.

Similarly, Krita, as a program intended to make images from scratch, doesn't really worry about assigning workspaces after having made the image. But because you are using the screen as a binocular to look at your image, and to pick colors, you can see your screen's device space as an input space to the image. Hence why profiling your monitor and giving the profile to Krita in the settings can help with preparing your work for print in the long run.

On top of all that, it is kinda useful to keep things like viewing conditions in the back of your mind. Many professional artists use a mid-grey color as their default canvas background because they find they create much more dynamic images due to having improved their viewing conditions. It is also why a lot of graphics programs, including Krita, come with a dark theme nowadays. (Though, of course this might also be because dark themes reflect the darkness of their souls... Who knows.)

Icc profiles

An Icc profile is a set of coordinates describing the extremities of the device space within XYZ, and it is the color management data you use to communicate your working space to printers and applications that are designed for the print industry, such as GIMP, Scribus, Photoshop, Illustrator, Inkscape, Digikam, RawTheraphee, etc. You have two types of icc profiles:

Matrix Shaper profiles.
These are delivered alongside Krita. Matrix shaper profiles are made by setting parameters and interpolating between these to get the exact size of the colour space. Due to this, Krita's color space browser can give you a lot of information on these profiles. Such profiles are also preferable as working space.
cLUT profiles
These are fairly rare, and primarily used to describe printer profiles, such as CMYK. cLUT, or Color Look-up Table profiles store far more data than Matrix shaper profiles, so they can hold data of little particularities caused by, for example, unexpected results from mixing pigments. This is a far more organic approach to describing a color space, and thus terrible to do color maths in.

The interesting thing about icc profiles is that your working space can be larger than your device space. This is generally not bad. However, when converting, you do end up with the question of how to translate the working space values.

This just squishes the values of the working space into the space it's converted to. It's a nice method to see all possible values in this, but not so good if you want accurate colour reproduction. Use this if you want to see all colours in an image, or want to express all possible contrasts.
Absolute Colorimetric.
The opposite to Perceptual, Absolute colorimetric will attempt to retain all the corect colours at whatever cost, which may result in awful looking colours. Recommended only for reproduction work.
Relative Colorimetric
A in between solution between perceptual and absolute, relative will try to fit whatever colours it can match between colour spaces. It cut's off the rest to their respective borders. This is a very powerful conversion intent, especially when you know the target device is colour managed.
Does anything to retain colourfulness, even hue will be sacrificed. Used in infographics.

ICC profile version is the last thing to keep in mind when dealing with ICC profiles. Krita delivers both Version 2 and Version 4 profiles, with the later giving better results in doing color maths, but the former being more widely supported(as seen below in 'interoperability with other programs'. This is also why Krita defaults to V2, and we recommend using V2 when you aren't certain if the other programs you are using support V4.

LUT docker and hdr imaging

LUT Management Docker.png

The LUT Docker is the second important bit of colour management in Krita, it helps you manage the editing and viewing of scene-referred images such as HDR photos.

To explain what that means, we first need to look at what we consider white or black.

White, on our monitor is full red, full green and full blue. But it's certainly different from white on our paper, or the colour of milk, white from the sun, or even the white of our cell-phone displays.

Black similarly, is brighter on a LCD display than a LED one, and incomparable with the black of a carefully sealed room.

This means that there's potentially blacker blacks than screen black, and white whites than screen white. However, for simplicity's sake we still assign the black-point and the white-point to certain values. From there, we can determine whether a white is whiter than the white point, or a black black than the black-point. But, because we are assigning a number to the possible whites and black, and also the greys in-between, we can use colour maths to show a different range of greys on the screen so we may examine the contrasts.

You do this with the LUT Docker.

The point of this is that you can take advantage of more lightness detail in an image. While you can't see the difference between screen white and whiter-than-screen white(because you screen can't show the difference), graphics programs can use it certainly.

A common example is matching the lighting between a 3d model and a real world scene. Others are advanced photo retouching, with much more contrast information available to the user. In painting itself, this allows you to create an image where you can be flippant with the contrast, and allow yourself to go as bright as you'd like.

Like Icc, the LUT Docker allows you to create a profile of sorts for your device. In this case it's the 'lut', which stands for 'Look Up Table'. The look up table is a table of lightness measurements made with a calorimeter. It gives an indication of how bright your screen gets at a given value.

There's one last technicality in regards to lightness:

Linear and Gamma corrected colours.

Now, the situation we talked about above is what we would call 'linear'. Each step of brightness is the same value. Our eyes do not perceive linearly. Rather, we find it more easy to distinguish between darker greys than we do between lighter greys. As humans are the ones using computers, we have made it so that computers will give more room to darker values in the coordinate system of the image. We call this 'gamma-encoding', because it is applying a gamma function to the TRC or transfer function of an image. The TRC in this case being the Tone Response Curve or Tone Reproduction Curve or Transfer function(because color management specialists hate themselves), which tells you computer or printer how much color corresponds to a certain value.

The following table shows how there's a lot of space being used by lighter values in a linear space compared to the default sRGB trc of our modern computers and other TRCs available in our delivered profiles:

Linear TRC
Lab L* TRC
Rec 709 TRC
Gamma 1.8 TRC
Gamma 2.2 TRC

If you look at linear of rec 709 TRCs, you can see there's quite a jump between the darker shades and the lighter shades, while if we look at the Lab L* TRC or the sRGB TRC, which seem more evenly spaced. This is due to our eyes' sensitivity to darker values. This also means that if you do not have enough bit depth, an image in a linear space will look as if it has ugly banding. Hence why, when we make images for viewing on a screen, we always use something like the LAB L*, sRGB or Gamma 2.2 TRCs to encode the image with.

However, this modification to give more space to darker values does lead to wonky color maths when mixing the colors.

We can see this with the following experiment:

Krita 2 9 colormanagement blending 1.png

Red circle and blue circle over grey, half blurred. In a gamma-corrected environment, this gives an odd black border. In a linear environment, this gives us a nice gradation.

This also counts for Krita's colour smudge brush:

That's right, the 'muddying' of colours as is a common complaint by digital painters everywhere, is in fact, a gamma-corrected colourspace mucking up your colours. If you had been working in LAB to avoid this, be sure to try out a linear rgb colour space.

What is happening under the hood

Imagine we want to mix red and green.

First, we would need the color coordinates of red and green inside our colour space's color model. So, that'd be...

Color Red Green Blue
Red 1.0 0.0 0.0
Green 0.0 1.0 0.0

We then avarage these coordinates over three mixes:

Red Mix1 Mix2 Mix3 Green
Red 1.0 0.75 0.5 0.25 0.0
Green 0.0 0.25 0.5 0.75 1.0
Blue 0.0 0.0 0.0 0.0 0.0

But to figure out how these colours look on screen, we first put the indvidual values through the TRC of the color-space we're working with:


Then we fill in the values into the correct spot. Compare these to the values of the mixture table above!

Linear TRC sRGB TRC Lab L* TRC
Red 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0
Mix1 0.75 0.25 0.0 0.52 0.05 0.0 0.48 0.04 0.0
Mix2 0.5 0.5 0.0 0.21 0.21 0.0 0.18 0.18 0.0
Mix3 0.25 0.75 0.0 0.05 0.52 0.0 0.04 0.48 0.0
Green 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0

And this is why colour mixtures are lighter and softer in linear space. Linear space is more physically correct, but sRGB is more efficient in terms of space, so hence why many images have an sRGB TRC encoded into them. In case this still doesn't make sense: sRGB gives largely darker values than linear space for the same coordinates.

So different TRCs give different mixes between colors, in the following example, every set of gradients is in order a mix using linear trc, a mix using srgb trc and a mix using lab L* trc.


So, you might be asking, how do I tick this option? Is it in the settings somewhere? The answer is that we have several icc profiles that can be used for this kind of work:

  • scRGB (linear)
  • All 'elle'-profiles ending in '1.0', such as sRGB-elle-v2-1.0.icc.

In fact, in all the 'elle'-profiles, the last number indicates the gamma. 1.0 is linear, higher is gamma-corrected and 'srgbtrc' is a special gamma correction for the original sRGB profile.

If you use the color space browser, you can tell the TRC from the 'estimated gamma'(if it's 1.0, it's linear), or from the TRC widget in Krita 3.0, which looks exactly like the curve graphs above.

Even if you do not paint much, but are for example making textures for a videogame or rendering, using a linear space is very beneficial and will speed up the renderer a little, for it won't have to convert images on it's own.

The downside of linear space is of course that white seems very overpowered when mixing with black, because in a linear space, light greys get more room.

Now that we've talked about icc, lut, working spaces and gamma-correction, there's one final thing we really need to cover:

Bit depth.

Bit depth basically refers to the amount of working memory per pixel you reserve for an image.

Like how having a A2 paper in real life can allow for much more detail in the end drawing, it does take up more of your desk than a simple A4 paper.

However, this does not just refer to the size of the image, but also how much precision you need per colour.

To illustrate this, I'll briefly talk about something that is not even available in Krita:

Indexed Colour.

Only two colours in total, usually black and white.
4bit(16 colors)
16 colors in total, these are famous as many early games were presented in this color palette.
256 colors in total. 8bit images are commonly used in games to save on memory for textures and sprites.

However, this is not available in Krita. Krita instead works with channels, and counts how many colours per channel you need. This is called 'real colour'.

Real Colour.

4bit per channel(not supported by Krita)
Also known as Hi-color, or 16bit color total. A bit of an old system, and not used outside of specific displays.
8bit per channel
Also known as "True Color", "Millions of colors" or "24bit/32bit". The standard for many screens, and the lowest bit-depth Krita can handle.
16bit per channel.
One step up from 8bit, 16bit per channel allows for colors that can't be displayed by the screen. However, due to this, you are more likely to have smoother gradients. Sometimes known as "Deep Color".
16bit float
Similar to 16bit, but with more precision. Where 16bit only allows coordinates like [1, 4, 3], 16bit float has coordinates like [0.15, 0.70, 0.3759] . Required for HDR images.
32bit float
similar to 16bit float but with even higher precision. The native color depth of OpenColor IO, and thus faster than 16bit float in HDR images, if not heavier.

This is important if you have a working colour space that is larger than your device space: At the least, if you do not want colour banding.

And while you can attempt to create all your images a 32bit float, this will quickly take up your ram. Therefore, it's important to consider which bit depth you will use for what kind of image.

In summary

Krita has two modes of colour management

  • Icc works in terms of spaces relative to the CIEXYZ space, and requires an icc profile.
  • LUT works in terms of interpretation, and makes use of luts.
  • both can be made with a colorimeter.

Krita does a lot of colour maths, often concerning the blending of colours. This colour maths works best in linear colour space, and linear colour space requires a bit depth of at the least 16bit to work correctly.

If you like painting, have a decent amount of ram, and are looking to start your baby-steps in taking advantage of Krita's colour management, try upgrading from having all your images in sRGB built-in to sRGB-v2-elle-1.0.icc at 16bit float. This'll give you better colour blending while opening up the possibility for you to start working in hdr!

Some graphics cards, such as those of the Nvidia-brand actually have the best performance under 16bit float, because Nvidia cards convert to floating point internally. When it does not need to do that, it speeds up!

No amount of color management in the world can make the image on your screen and the image out of the printer have 100% the same color.


when you finished you image and are ready to export it, you can modify the color space to optimize it:

If you are preparing an image for the web:

  • If you use 16bit color depth or higher, convert the image to 8bit color depth. This will make the image much much more smaller.
  • If it's a gray-scale image, convert it to gray-scale.
  • If it's a color image, keep it in the working space profile: Many web browsers these days support color profiles embedded into images. Firefox, for example, will try to convert your image to fit the color profile of the other's monitor(if they have one), that way, the image will look near exactly the same on your screen and other profiled monitors.

In some versions of Firefox, the colours actually look strange: This is a bug in Firefox, which is resolved in the newest version.

If you are preparing for print:

  • You hopefully made the picture in a working space profile, if not convert it to something like adobe rgb.
  • Check with the printer what kind of image they expect. Maybe they expect RGB color space, or perhaps they have their own profile.

Interaction with other applications


If you wish to use krita's OCIO functionality, and in particular in combination with Blender's color management, you can try to have it use Blender's OCIO config.

Blender's OCIO config is under <Blender-folder>/version number/datafiles/colormanagement. Set the LUT docker to use the OCIO engine, and select the config from the above path. This will give you blender's input and screen spaces, but not the looks, as those aren't supported in Krita yet.

Windows Photo Viewer

You might encounter some issues when using different applications together. One important thing to note is that the standard Windows Photo Viewer application does not handle modern ICC profiles. Krita uses version 4 profiles; Photo Viewer can only handle version 2 profiles. If you export to JPEG with an embedded profile, Photo Viewer will display your image much too dark.

External Links

Content is available under Creative Commons License SA 4.0 unless otherwise noted.