:orphan: # PetscDrawRealToColor Maps a real value within an interval to a color. The color is an integer value in the range [`PETSC_DRAW_BASIC_COLORS` to 255] that can be passed to various drawing routines. ## Synopsis ``` #include int PetscDrawRealToColor(PetscReal value,PetscReal min,PetscReal max) ``` Not Collective ## Input Parameters - ***value -*** value to map within the interval [`min`, `max`] - ***min -*** lower end of interval - ***max -*** upper end of interval ## Returns The result as integer ## Note Values outside the interval [`min`, `max`] are clipped. ## See Also `PetscDraw`, `PetscDrawPointPixel()`, `PetscDrawPoint()`, `PetscDrawLine()`, `PetscDrawTriangle()`, `PetscDrawRectangle()` ## Level intermediate ## Location include/petscdraw.h --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscdraw.h) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)