test27.f90 Source File


This file depends on

sourcefile~~test27.f90~~EfferentGraph sourcefile~test27.f90 test27.f90 sourcefile~forimage.f90 forimage.f90 sourcefile~test27.f90->sourcefile~forimage.f90 sourcefile~forcolor.f90 forcolor.f90 sourcefile~forimage.f90->sourcefile~forcolor.f90 sourcefile~forimage_parameters.f90 forimage_parameters.f90 sourcefile~forimage.f90->sourcefile~forimage_parameters.f90 sourcefile~lut.f90 lut.f90 sourcefile~forimage.f90->sourcefile~lut.f90 sourcefile~pnm.f90 pnm.f90 sourcefile~forimage.f90->sourcefile~pnm.f90 sourcefile~forcolor.f90->sourcefile~forimage_parameters.f90 sourcefile~forcolor.f90->sourcefile~pnm.f90 sourcefile~pnm.f90->sourcefile~forimage_parameters.f90

Source Code

program example27

   use forimage, only: ik, color
   implicit none

   type(color) :: custom_color, nearest_color

   call custom_color%set(name='custom_color', decimal=16711680_ik)

   print'(a)', 'Find the nearest color to the custom color'
   call custom_color%convert('decimal2rgb')
   call custom_color%find_nearest(nearest_color)

   call nearest_color%print()

end program example27