# ISColoringGetColors
Returns an array with the color for each local node 
## Synopsis
```
#include "petscis.h"  
PetscErrorCode ISColoringGetColors(ISColoring iscoloring, PetscInt *n, PetscInt *nc, const ISColoringValue **colors)
```
Not Collective


## Input Parameter

- ***iscoloring -*** the coloring context



## Output Parameters

- ***n -*** number of nodes
- ***nc -*** number of colors
- ***colors -*** color for each node





## Notes
Do not free the colors[] array.

The colors[] array will only be valid for the lifetime of the `ISColoring`


## See Also
 `ISColoring`, `ISColoringValue`, `ISColoringRestoreIS()`, `ISColoringView()`, `ISColoringGetIS()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/utils/iscoloring.c.html#ISColoringGetColors">src/vec/is/is/utils/iscoloring.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/is/utils/iscoloring.c)


[Index of all IS routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
