oyNamedColor_s Struct Reference
Description: C source code API documentation for the Oyranos project.
Keywords: Oyranos,Color Management,Color Management,ICC,CMS,C,doxygen,API,documentation

| Oyranos Color Management System API - Version 0.9.6

Public Member Functions | Data Fields
oyNamedColor_s Struct Reference
Color » Named Colors

Single Color object. More...

`#include <oyNamedColor_s.h>`

Inheritance diagram for oyNamedColor_s:
Collaboration diagram for oyNamedColor_s:

## Public Member Functions
OYAPI oyNamedColor_s *OYEXPORT | oyNamedColor_New (oyObject_s object)
| allocate a new NamedColor object More...
| oyNamedColor_Copy
| Copy or Reference a NamedColor object. More...
OYAPI int OYEXPORT | oyNamedColor_Release (oyNamedColor_s **namedcolor)
| release and possibly deallocate a oyNamedColor_s object More...
oyNamedColor_s * | oyNamedColor_Create (const double *chan, const char *blob, int blob_len, oyProfile_s *ref, oyObject_s object)
| manage complex oyNamedColor_s inside Oyranos More...
oyNamedColor_s * | oyNamedColor_CreateWithName (const char *nick, const char *name, const char *description, const double *chan, const double *XYZ, const char *blob, int blob_len, oyProfile_s *profile_ref, oyObject_s object)
| create a oyNamedColor_s struct More...
oyProfile_s * | oyNamedColor_GetSpaceRef (oyNamedColor_s *color)
| get a color space reference More...
void | oyNamedColor_SetChannels (oyNamedColor_s *color, const double *channels, uint32_t flags)
| set color channels More...
int | oyNamedColor_GetColor (oyNamedColor_s *color, oyProfile_s *profile, oyPointer buf, oyDATATYPE_e buf_type, uint32_t flags, oyOptions_s *options)
| convert a named color to a standard color space More...
int | oyNamedColor_SetColorStd (oyNamedColor_s *color, oyPROFILE_e color_space, oyPointer channels, oyDATATYPE_e channels_type, uint32_t flags, oyOptions_s *options)
| set color channels More...
const double * | oyNamedColor_GetChannelsConst (oyNamedColor_s *color, uint32_t flags)
| get color channels More...
const double * | oyNamedColor_GetXYZConst (oyNamedColor_s *color)
| get XYZ channels More...
int | oyNamedColor_GetColorStd (oyNamedColor_s *color, oyPROFILE_e color_space, oyPointer buf, oyDATATYPE_e buf_type, uint32_t flags, oyOptions_s *options)
| convert a named color to a standard color space More...
const char * | oyNamedColor_GetName (oyNamedColor_s *color, oyNAME_e type, uint32_t flags)
| get color channels More...
Public Member Functions inherited from oyStruct_s
const char * | oyStruct_GetTextFromModule (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
| get object infos from a module More...
const char * | oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
| Get a text dump. More...
| oyStruct_RegisterStaticMessageFunc
| register a function for verbosity More...
| oyStruct_GetInfo
| get a additional string from a object More...
const char * | oyStructTypeToText (oyOBJECT_e type)
| Objects type to small string. More...

## Data Fields
const oyOBJECT_e | type_
| Type of object. More...
oyStruct_Copy_f | copy
| Copy function. More...
oyStruct_Release_f | release
| Release function. More...
oyObject_s | oy_
| Oyranos internal object. More...
Data Fields inherited from oyStruct_s
const oyOBJECT_e | type_
| Type of object. More...
oyStruct_Copy_f | copy
| Copy function. More...
oyStruct_Release_f | release
| Release function. More...
oyObject_s | oy_
| Oyranos internal object. More...

## Detailed Description

Single Color object.

Version
  Oyranos: 0.9.5

Since
  2007/10/00 (Oyranos: 0.1.8)

Date
  2013/08/15

## Member Function Documentation

## ◆ oyNamedColor_Copy()

oyNamedColor_Copy

Copy or Reference a NamedColor object.

The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.

Parameters

  [in] | namedcolor | NamedColor struct object
  | object | NULL - means reference, the optional object triggers a real copy

## ◆ oyNamedColor_Create()

oyNamedColor_s * oyNamedColor_Create | ( | const double * | chan,
|  | const char * | blob,
|  | int | blob_len,
|  | oyProfile_s * | ref,
|  | oyObject_s | object
| ) |  |

manage complex oyNamedColor_s inside Oyranos

Since
  Oyranos: version 0.1.8

Date
  october 2007 (API 0.1.8)

Parameters

  [in] | chan | pointer to channel data with a number of elements specified in sig or channels_n, optional
  [in] | blob | CGATS or other reference data, optional
  [in] | blob_len | length of the data blob
  [in] | ref | possibly a ICC profile
  | object | the optional object

References oyNamedColor_New(), oyProfile_s::oyProfile_Copy(), and oyProfile_s::oyProfile_GetChannelsCount().

Referenced by oyNamedColor_CreateWithName().

## ◆ oyNamedColor_CreateWithName()

oyNamedColor_s * oyNamedColor_CreateWithName | ( | const char * | nick,
|  | const char * | name,
|  | const char * | description,
|  | const double * | chan,
|  | const double * | XYZ,
|  | const char * | blob,
|  | int | blob_len,
|  | oyProfile_s * | profile_ref,
|  | oyObject_s | object
| ) |  |

create a oyNamedColor_s struct

Function: oyNamedColor_CreateWithName

Since
  Oyranos: version 0.1.8

Date
  22 december 2007 (API 0.1.8)

Parameters

  [in] | nick | very short, only a few letters
  [in] | name | of the color
  [in] | description | description
  [in] | chan | pointer to channel data with a number of elements specified in sig or channels_n
  [in] | XYZ | reference values
  [in] | blob | CGATS or other reference data
  [in] | blob_len | length of the data blob
  [in] | profile_ref | profile
  [in] | object | memory management

Returns
  a oyNamedColor_s

References oyNamedColor_Create(), oyObject_NewFrom(), oyObject_Release(), and oyObject_SetNames().

## ◆ oyNamedColor_GetChannelsConst()

const double * oyNamedColor_GetChannelsConst | ( | oyNamedColor_s * | color,
|  | uint32_t | flags
| ) |  |

get color channels

Function: oyNamedColor_GetChannelsConst

Parameters

  [in] | color | Oyranos color struct pointer
  [in] | flags | reserved

Returns
  pointer channels

Since
  Oyranos: version 0.1.8

Date
  october 2007 (API 0.1.8)

## ◆ oyNamedColor_GetColor()

int oyNamedColor_GetColor | ( | oyNamedColor_s * | color,
|  | oyProfile_s * | profile,
|  | oyPointer | buf,
|  | oyDATATYPE_e | buf_type,
|  | uint32_t | flags,
|  | oyOptions_s * | options
| ) |  |

convert a named color to a standard color space

Function: oyNamedColor_GetColor

Since
  Oyranos: version 0.1.8

Date
  23 december 2007 (API 0.1.8)

## ◆ oyNamedColor_GetColorStd()

int oyNamedColor_GetColorStd | ( | oyNamedColor_s * | color,
|  | oyPROFILE_e | color_space,
|  | oyPointer | buf,
|  | oyDATATYPE_e | buf_type,
|  | uint32_t | flags,
|  | oyOptions_s * | options
| ) |  |

convert a named color to a standard color space

Function: oyNamedColor_GetColorStd

Since
  Oyranos: version 0.1.8

Date
  23 december 2007 (API 0.1.8)

## ◆ oyNamedColor_GetName()

const char * oyNamedColor_GetName | ( | oyNamedColor_s * | color,
|  | oyNAME_e | type,
|  | uint32_t | flags
| ) |  |

get color channels

Function: oyNamedColor_GetName

Since
  Oyranos: version 0.1.8

Date
  22 december 2007 (API 0.1.8)

Referenced by oyNamedColors_s::oyNamedColors_GetColorName().

## ◆ oyNamedColor_GetSpaceRef()

oyProfile_s * oyNamedColor_GetSpaceRef | ( | oyNamedColor_s * | color | ) |

get a color space reference

Function: oyNamedColor_GetSpaceRef

Since
  Oyranos: version 0.1.8

Date
  23 december 2007 (API 0.1.8)

References oyProfile_s::oyProfile_Copy().

## ◆ oyNamedColor_GetXYZConst()

const double * oyNamedColor_GetXYZConst | ( | oyNamedColor_s * | color | ) |

get XYZ channels

Function: oyNamedColor_GetXYZConst

Parameters

  [in] | color | Oyranos color struct pointer

Returns
  pointer XYZ channels

Version
  Oyranos: 0.1.8

Date
  2008/02/18

Since
  2008/02/18 (Oyranos: 0.1.8)

## ◆ oyNamedColor_New()

OYAPI oyNamedColor_s *OYEXPORT oyNamedColor_New | ( | oyObject_s | object | ) |

allocate a new NamedColor object

Function oyNamedColor_New

References oyOBJECT_OBJECT_S.

Referenced by oyNamedColor_Create().

## ◆ oyNamedColor_Release()

OYAPI int OYEXPORT oyNamedColor_Release | ( | oyNamedColor_s ** | namedcolor | ) |

release and possibly deallocate a oyNamedColor_s object

Function oyNamedColor_Release

Parameters

  [in,out] | namedcolor | NamedColor struct object

References oyOBJECT_NAMED_COLOR_S.

Referenced by oyNamedColors_s::oyNamedColors_GetColorName().

## ◆ oyNamedColor_SetChannels()

void oyNamedColor_SetChannels | ( | oyNamedColor_s * | color,
|  | const double * | channels,
|  | uint32_t | flags
| ) |  |

set color channels

Function: oyNamedColor_SetChannels

Parameters

  [in] | color | Oyranos color struct pointer
  [in] | channels | pointer to channel data
  [in] | flags | reserved

Since
  Oyranos: version 0.1.8

Date
  october 2007 (API 0.1.8)

## ◆ oyNamedColor_SetColorStd()

int oyNamedColor_SetColorStd | ( | oyNamedColor_s * | color,
|  | oyPROFILE_e | color_space,
|  | oyPointer | channels,
|  | oyDATATYPE_e | channels_type,
|  | uint32_t | flags,
|  | oyOptions_s * | options
| ) |  |

set color channels

Function: oyNamedColor_SetColorStd

Parameters

  [in] | color | Oyranos color struct pointer
  [in] | color_space | Oyranos standard color space
  [in] | channels | pointer to channel data
  [in] | channels_type | data type
  [in] | flags | reserved for future use
  [in] | options | for filter node creation

Returns
  error

Since
  Oyranos: version 0.1.8

Date
  23 december 2007 (API 0.1.8)

## Field Documentation

## ◆ copy

oyStruct_Copy_f oyNamedColor_s::copy

Copy function.

## ◆ oy_

oyObject_s oyNamedColor_s::oy_

Oyranos internal object.

Features name and hash. Do not change during object life time.

Referenced by oyNamedColors_s::oyNamedColors_GetColorName().

## ◆ release

oyStruct_Release_f oyNamedColor_s::release

Release function.

## ◆ type_

const oyOBJECT_e oyNamedColor_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.

Referenced by oyNamedColors_s::oyNamedColors_MoveIn().