---
title: NCWNewColorWorld
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/colorsync_manager/1805079-ncwnewcolorworld
---

# NCWNewColorWorld

Creates a color world for color matching based on the specified source and destination profiles. 

## Declaration

```occ
CMError NCWNewColorWorld (
   CMWorldRef *cw,
   CMProfileRef src,
   CMProfileRef dst
);
```

## Parameters

- `cw`: A pointer to a color world. On return, a reference to a matching session color world of type [doc://com.apple.documentation/documentation/applicationservices/cmworldref](applicationservices/cmworldref.md). You pass this reference to other functions that use the color world.
- `src`: A profile reference of type [doc://com.apple.documentation/documentation/applicationservices/cmprofileref](applicationservices/cmprofileref.md) that specifies the source profile for the color-matching world. This profile’s `dataColorSpace` element corresponds to the source data type for subsequent calls to functions that use this color world.
 Starting with ColorSync version 2.5, you can call [doc://com.apple.documentation/documentation/applicationservices/colorsync_manager/1804940-cmgetdefaultprofilebyspace](applicationservices/colorsync_manager/1804940-cmgetdefaultprofilebyspace.md) to get the default profile for a specific color space or [doc://com.apple.documentation/documentation/applicationservices/colorsync_manager/1804955-cmgetprofilebyavid](applicationservices/colorsync_manager/1804955-cmgetprofilebyavid.md) to get a profile for a specific display. 
 With any version of ColorSync, you can specify a `NULL` value to indicate the ColorSync system profile. Note, however, that starting with version 2.5, use of the system profile has changed.
- `dst`: A profile reference of type [doc://com.apple.documentation/documentation/applicationservices/cmprofileref](applicationservices/cmprofileref.md) that specifies the destination profile for the color-matching world. This profile’s `dataColorSpace` element corresponds to the destination data type for subsequent calls to functions using this color world.
 Starting with ColorSync version 2.5, you can call [doc://com.apple.documentation/documentation/applicationservices/colorsync_manager/1804940-cmgetdefaultprofilebyspace](applicationservices/colorsync_manager/1804940-cmgetdefaultprofilebyspace.md) to get the default profile for a specific color space or [doc://com.apple.documentation/documentation/applicationservices/colorsync_manager/1804955-cmgetprofilebyavid](applicationservices/colorsync_manager/1804955-cmgetprofilebyavid.md) to get a profile for a specific display.
  With any version of ColorSync, you can specify a `NULL` value to indicate the ColorSync system profile. Note, however, that starting with version 2.5, use of the system profile has changed.

## Return Value

A `CMError` value. See [Result Codes](../colorsync_manager.md).

## Overview

You must set up a color world before your application can perform general purpose color-matching or color-checking operations. To set up a color world for these operations, your application can call `NCWNewColorWorld` after obtaining references to the profiles to use as the source and destination profiles for the color world. The following rules govern the types of profiles allowed:

- You can specify a device profile or a color space conversion profile for the source and destination profiles.
- You can not specify a device link profile or an abstract profile for either the source profile or the destination profile.
- Only one profile can be a named color profile.
- You can specify the system profile explicitly by reference or by giving `NULL` for either the source profile or the destination profile.

You should call the function [CMCloseProfile](1804861-cmcloseprofile.md) for both the source and destination profiles to dispose of their references after execution of the `NCWNewColorWorld` function.

The quality flag setting (indicating normal mode, draft mode, or best mode) specified by the source profile prevails for the entire session. The quality flag setting is stored in the `flags` field of the profile header. See [CM2Header](../cm2header.md) and [Flag Mask Definitions for Version 2.x Profiles](../1560699-x_profiles.md) for more information on the use of flags. The rendering intent specified by the source profile also prevails for the entire session.

The function [CWConcatColorWorld](1805087-cwconcatcolorworld.md) also allocates a color world reference of type [CMWorldRef](../cmworldref.md). 

### Version-Notes

The parameter descriptions for `src` and `dst` describe changes in how this functions is used starting with ColorSync version 2.5.

## See Also

### Working With ColorWorlds

- [CWConcatColorWorld](1805087-cwconcatcolorworld.md)
- [NCWConcatColorWorld](1805091-ncwconcatcolorworld.md)
- [CMGetCWInfo](1805097-cmgetcwinfo.md)
- [CWDisposeColorWorld](1805102-cwdisposecolorworld.md)
- [CWMatchColors](1805108-cwmatchcolors.md)
- [CWCheckColors](1805111-cwcheckcolors.md)
- [CWMatchBitmap](1805116-cwmatchbitmap.md)
- [CWCheckBitmap](1805121-cwcheckbitmap.md)
- [CWFillLookupTexture](1805126-cwfilllookuptexture.md)
